1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Allow /msg with no message to open private chat window

This commit is contained in:
James Booth 2013-01-15 19:41:48 +00:00
parent 62b89a4d8a
commit fb9fc6529a

View File

@ -1540,12 +1540,16 @@ _cmd_msg(gchar **args, struct cmd_help_t help)
g_string_append(full_jid, "/"); g_string_append(full_jid, "/");
g_string_append(full_jid, usr); g_string_append(full_jid, usr);
jabber_send(msg, full_jid->str); if (msg != NULL) {
win_show_outgoing_msg("me", full_jid->str, msg); jabber_send(msg, full_jid->str);
win_show_outgoing_msg("me", full_jid->str, msg);
if (prefs_get_chlog()) { if (prefs_get_chlog()) {
const char *jid = jabber_get_jid(); const char *jid = jabber_get_jid();
chat_log_chat(jid, full_jid->str, msg, PROF_OUT_LOG, NULL); 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); g_string_free(full_jid, TRUE);