Merge pull request #586 from LemonBoy/fix-580

Process the nick changes in queries before the PRIVMSG is handled.
This commit is contained in:
ailin-nemui 2017-01-02 14:44:07 +01:00 committed by GitHub
commit 91f48c6f0e
2 changed files with 7 additions and 16 deletions

View file

@ -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);
}
}