diff options
author | James Booth <boothj5@gmail.com> | 2013-01-15 19:41:48 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-01-15 19:41:48 +0000 |
commit | fb9fc6529a7c4c9f7c7bfd3471bec5edb5154c49 (patch) | |
tree | 297cecc4e5323b884e8699cd2d59070893604ba2 | |
parent | 62b89a4d8a67b89702dc8a6ade6a13e167bc8db6 (diff) | |
download | profani-tty-fb9fc6529a7c4c9f7c7bfd3471bec5edb5154c49.tar.gz |
Allow /msg with no message to open private chat window
-rw-r--r-- | src/command.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/command.c b/src/command.c index d688061f..d769cd8e 100644 --- a/src/command.c +++ b/src/command.c @@ -1540,12 +1540,16 @@ _cmd_msg(gchar **args, struct cmd_help_t help) g_string_append(full_jid, "/"); g_string_append(full_jid, usr); - jabber_send(msg, full_jid->str); - win_show_outgoing_msg("me", full_jid->str, msg); + 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); + 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); } g_string_free(full_jid, TRUE); |