diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/command.c | 9 | ||||
-rw-r--r-- | src/profanity.c | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/command.c b/src/command.c index d769cd8e..d79e4623 100644 --- a/src/command.c +++ b/src/command.c @@ -879,7 +879,7 @@ cmd_execute_default(const char * const inp) char *recipient = win_current_get_recipient(); jabber_send(inp, recipient); - if (prefs_get_chlog()) { + if (win_current_is_chat() && prefs_get_chlog()) { const char *jid = jabber_get_jid(); chat_log_chat(jid, recipient, inp, PROF_OUT_LOG, NULL); } @@ -1543,11 +1543,6 @@ _cmd_msg(gchar **args, struct cmd_help_t help) if (msg != NULL) { jabber_send(msg, full_jid->str); win_show_outgoing_msg("me", full_jid->str, msg); - - if (prefs_get_chlog()) { - const char *jid = jabber_get_jid(); - chat_log_chat(jid, full_jid->str, msg, PROF_OUT_LOG, NULL); - } } else { win_new_chat_win(full_jid->str); } @@ -1565,7 +1560,7 @@ _cmd_msg(gchar **args, struct cmd_help_t help) jabber_send(msg, usr); win_show_outgoing_msg("me", usr, msg); - if (prefs_get_chlog()) { + if (win_current_is_chat() && prefs_get_chlog()) { const char *jid = jabber_get_jid(); chat_log_chat(jid, usr, msg, PROF_OUT_LOG, NULL); } diff --git a/src/profanity.c b/src/profanity.c index a16ea474..8ed5d812 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -122,7 +122,7 @@ prof_handle_incoming_message(char *from, char *message, gboolean priv) ui_show_incoming_msg(from, message, NULL, priv); win_current_page_off(); - if (prefs_get_chlog()) { + if (win_current_is_chat() && prefs_get_chlog()) { char from_cpy[strlen(from) + 1]; strcpy(from_cpy, from); char *short_from = strtok(from_cpy, "/"); @@ -139,7 +139,7 @@ prof_handle_delayed_message(char *from, char *message, GTimeVal tv_stamp, ui_show_incoming_msg(from, message, &tv_stamp, priv); win_current_page_off(); - if (prefs_get_chlog()) { + if (win_current_is_chat() && prefs_get_chlog()) { char from_cpy[strlen(from) + 1]; strcpy(from_cpy, from); char *short_from = strtok(from_cpy, "/"); |