diff options
author | TingPing <tngpng@gmail.com> | 2013-05-16 09:21:02 -0700 |
---|---|---|
committer | TingPing <tngpng@gmail.com> | 2013-05-16 09:21:02 -0700 |
commit | b28734c4a8073b35a70707703c55c5266190cc1d (patch) | |
tree | fc5d99216dbb05cac94e188ffed3bef4cc0a92d6 /src | |
parent | 69c2893234452107b2db67e431868d7400ea25aa (diff) | |
parent | cf59ad2c769a3ec2f5d977809697fa52d2c3de3a (diff) |
Merge pull request #581 from orium/numeric-session-with-open-query
Session of numeric events passed to text_emit() for nicks with open query dialogs
Diffstat (limited to 'src')
-rw-r--r-- | src/common/proto-irc.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index 00767b89..8556f9e9 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -922,16 +922,21 @@ process_numeric (session * sess, int n, } def: - if (is_channel (serv, word[4])) { - session *realsess = find_channel (serv, word[4]); - if (!realsess) - realsess = serv->server_session; - EMIT_SIGNAL (XP_TE_SERVTEXT, realsess, text, word[1], word[2], NULL, 0); - } else - { - EMIT_SIGNAL (XP_TE_SERVTEXT, serv->server_session, text, word[1], - word[2], NULL, 0); + session *sess; + + if (is_channel (serv, word[4])) + { + sess = find_channel (serv, word[4]); + if (!sess) + sess = serv->server_session; + } + else if ((sess=find_dialog (serv,word[4]))) /* user with an open dialog */ + ; + else + sess=serv->server_session; + + EMIT_SIGNAL (XP_TE_SERVTEXT, sess, text, word[1], word[2], NULL, 0); } } } |