diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-01 09:36:05 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-03-01 09:36:05 +0100 |
commit | 882be565c331efe10bb45a5f9fd3b0fd35a8222d (patch) | |
tree | 124fd61a4acc4816cb56e36e54c7334be51a4d2c /src/plugins/irc/irc-protocol.c | |
parent | 1a69bbcb1eff2e322fa3b1477db289fb9267f1eb (diff) | |
download | weechat-882be565c331efe10bb45a5f9fd3b0fd35a8222d.zip |
Fix IRC command /who (nothing was displayed if WeeChat already checked channel for away nicks) (bug #25736)
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 5d7982f97..e395cbe97 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -3668,23 +3668,20 @@ irc_protocol_cmd_352 (struct t_irc_server *server, const char *command, } ptr_channel = irc_channel_search (server, argv[3]); - if (ptr_channel) + if (ptr_channel && (ptr_channel->checking_away > 0)) { - if (ptr_channel->checking_away > 0) + ptr_nick = irc_nick_search (ptr_channel, argv[7]); + if (ptr_nick) { - ptr_nick = irc_nick_search (ptr_channel, argv[7]); - if (ptr_nick) - { - if (ptr_nick->host) - free (ptr_nick->host); - length = strlen (argv[4]) + 1 + strlen (argv[5]) + 1; - ptr_nick->host = malloc (length); - if (ptr_nick->host) - snprintf (ptr_nick->host, length, "%s@%s", argv[4], argv[5]); - if (pos_attr) - irc_nick_set_away (ptr_channel, ptr_nick, - (pos_attr[0] == 'G') ? 1 : 0); - } + if (ptr_nick->host) + free (ptr_nick->host); + length = strlen (argv[4]) + 1 + strlen (argv[5]) + 1; + ptr_nick->host = malloc (length); + if (ptr_nick->host) + snprintf (ptr_nick->host, length, "%s@%s", argv[4], argv[5]); + if (pos_attr) + irc_nick_set_away (ptr_channel, ptr_nick, + (pos_attr[0] == 'G') ? 1 : 0); } } else |