diff options
author | Jilles Tjoelker <jilles@irssi.org> | 2009-04-03 17:49:58 +0000 |
---|---|---|
committer | jilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2009-04-03 17:49:58 +0000 |
commit | bb92a2dbc765f365fe10054acc8f0f01e06a7f38 (patch) | |
tree | 5f1a0f9257fd563f7b236af18d29dd3337ccab44 /src/fe-common/irc | |
parent | 65feac9ef21ab7dc21cbd2c966c843d71c995000 (diff) | |
download | irssi-bb92a2dbc765f365fe10054acc8f0f01e06a7f38.zip |
Show numerics directed at channels in the channel window.
This is about numerics where the target parameter is
a channel, i.e. ":<server> <numeric> <#channel> ..."
Usually, this parameter is the user's nick or an asterisk.
An example is the numeric ircd-ratbox and charybdis send
to channel operators on a successful /knock.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5056 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc')
-rw-r--r-- | src/fe-common/irc/fe-events-numeric.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c index dbc061d7..93e1d79a 100644 --- a/src/fe-common/irc/fe-events-numeric.c +++ b/src/fe-common/irc/fe-events-numeric.c @@ -555,13 +555,15 @@ static void print_event_received(IRC_SERVER_REC *server, const char *data, g_return_if_fail(data != NULL); - /* skip first param, it's always our nick */ + /* first param is our nick, "*" or a channel */ ptr = strchr(data, ' '); if (ptr == NULL) return; ptr++; - if (!target_param || *ptr == ':' || (ptr2 = strchr(ptr, ' ')) == NULL) + if (ischannel(*data)) /* directed at channel */ + target = g_strndup(data, (int)(ptr - data - 1)); + else if (!target_param || *ptr == ':' || (ptr2 = strchr(ptr, ' ')) == NULL) target = NULL; else { /* target parameter expected and present */ |