diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-10 19:51:36 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-10 19:51:36 +0000 |
commit | c1b73039cd9e53275f89bf27d35af520b3d5f4db (patch) | |
tree | 7582528d04a905a564ce26bcc31c558853295541 /src/fe-common/irc/fe-irc-commands.c | |
parent | ff86916dc38033d6b459ece72028e84eeab3938c (diff) | |
download | irssi-c1b73039cd9e53275f89bf27d35af520b3d5f4db.zip |
If autocreate_query is ON, /MSG nick now creates the query.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@313 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-commands.c')
-rw-r--r-- | src/fe-common/irc/fe-irc-commands.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c index d406fa30..429186f5 100644 --- a/src/fe-common/irc/fe-irc-commands.c +++ b/src/fe-common/irc/fe-irc-commands.c @@ -153,8 +153,13 @@ static void cmd_msg(gchar *data, IRC_SERVER_REC *server, WI_ITEM_REC *item) else { /* private message */ + if (settings_get_bool("autocreate_query") && query_find(server, target) == NULL) + item = (WI_ITEM_REC *) query_create(server, target, FALSE); + else + item = (WI_ITEM_REC *) query_find(server, target); + printformat(server, target, MSGLEVEL_MSGS | MSGLEVEL_NOHILIGHT, - query_find(server, target) == NULL ? IRCTXT_OWN_MSG_PRIVATE : IRCTXT_OWN_MSG_PRIVATE_QUERY, target, msg, server->nick); + item == NULL ? IRCTXT_OWN_MSG_PRIVATE : IRCTXT_OWN_MSG_PRIVATE_QUERY, target, msg, server->nick); } g_free_not_null(freestr); |