summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2016-12-15 15:22:30 +0100
committerLemonBoy <thatlemon@gmail.com>2016-12-15 19:36:44 +0100
commit0d6add02cf1a1e0dc3905a482d259a8851b4939c (patch)
treed68828f8508fe8c24e492f61b46ff5729d6d562c /src/fe-common
parent618c8bd10e45b3132d356e2f6bec290a63b8a9fa (diff)
downloadirssi-0d6add02cf1a1e0dc3905a482d259a8851b4939c.zip
Process the nick changes in queries before the PRIVMSG is handled.
Otherwise we end up with the message in the status window since the frontend knows jack shit about the casemapping option when it tries to find the associated window for the query.
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/irc/fe-irc-queries.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fe-common/irc/fe-irc-queries.c b/src/fe-common/irc/fe-irc-queries.c
index b2faefbc..c928a94a 100644
--- a/src/fe-common/irc/fe-irc-queries.c
+++ b/src/fe-common/irc/fe-irc-queries.c
@@ -78,6 +78,13 @@ static void event_privmsg(SERVER_REC *server, const char *data,
if (!server_has_nick(server, query->name))
query_change_nick(query, nick);
}
+ } else {
+ /* process the changes to the query structure now, before the
+ * privmsg is dispatched. */
+ if (g_strcmp0(query->name, nick) != 0)
+ query_change_nick(query, nick);
+ if (address != NULL && g_strcmp0(query->address, address) != 0)
+ query_change_address(query, address);
}
}