diff options
author | Alexander Færøy <ahf@0x90.dk> | 2014-12-06 16:11:15 +0100 |
---|---|---|
committer | Alexander Færøy <ahf@0x90.dk> | 2014-12-06 16:11:15 +0100 |
commit | d87c494d893e22bb172f9f9e8f2378606b29114a (patch) | |
tree | fda34e63029777c3217db7dd282b515ec1656f96 /src/fe-common/core/fe-queries.c | |
parent | bbd733392446951f41d04c88cbab9a46ccec31d5 (diff) | |
parent | 1edfcedda1105d79fa6b92d77a8fb60f296abe1e (diff) | |
download | irssi-d87c494d893e22bb172f9f9e8f2378606b29114a.zip |
Merge pull request #162 from dequis/self-messages
Receive 'self messages' in the right query window
Diffstat (limited to 'src/fe-common/core/fe-queries.c')
-rw-r--r-- | src/fe-common/core/fe-queries.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c index 7599fb23..5cdf87ee 100644 --- a/src/fe-common/core/fe-queries.c +++ b/src/fe-common/core/fe-queries.c @@ -326,12 +326,15 @@ static int sig_query_autoclose(void) } static void sig_message_private(SERVER_REC *server, const char *msg, - const char *nick, const char *address) + const char *nick, const char *address, const char *target) { QUERY_REC *query; + /* own message returned by bouncer? */ + int own = (!strcmp(nick, server->nick)); + /* create query window if needed */ - query = privmsg_get_query(server, nick, FALSE, MSGLEVEL_MSGS); + query = privmsg_get_query(server, own ? target : nick, FALSE, MSGLEVEL_MSGS); /* reset the query's last_unread_msg timestamp */ if (query != NULL) |