From c1b73039cd9e53275f89bf27d35af520b3d5f4db Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 10 Jun 2000 19:51:36 +0000 Subject: [PATCH] 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 --- src/fe-common/irc/fe-irc-commands.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);