Moved OTR policy check to otr module

This commit is contained in:
James Booth
2014-05-11 15:03:10 +01:00
parent 95ff13136b
commit e8d84abb46
5 changed files with 14 additions and 3 deletions

View File

@@ -1363,7 +1363,7 @@ cmd_execute_default(const char * const inp)
ui_current_print_line("You are not currently connected.");
} else {
#ifdef HAVE_LIBOTR
if ((strcmp(prefs_get_string(PREF_OTR_POLICY), "always") == 0) && !otr_is_secure(recipient)) {
if ((strcmp(otr_get_policy(recipient), "always") == 0) && !otr_is_secure(recipient)) {
cons_show_error("Failed to send message. Please check OTR policy");
return TRUE;
}