summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-01-25 17:36:59 +0100
committerSébastien Helleu <flashcode@flashtux.org>2015-01-25 17:36:59 +0100
commit391d88d296cc7607af1ffd5a9139209a167cb3a8 (patch)
treef74ac611350e96025240819516901f48bfae5a0f /src/plugins/irc
parentb1a1e1483280b2f01a6a7f352a6aac7dcc621466 (diff)
downloadweechat-391d88d296cc7607af1ffd5a9139209a167cb3a8.zip
irc: fix set of variable "pos_account" in callback for message "354"
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-protocol.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index fad0fa3a0..c68520cd7 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -4256,13 +4256,10 @@ IRC_PROTOCOL_CALLBACK(354)
pos_attr = argv[8];
pos_hopcount = argv[9];
- pos_account = NULL;
+ pos_account = (strcmp (argv[10], "0") != 0) ? argv[10] : NULL;
pos_realname = (argc > 11) ?
((argv_eol[11][0] == ':') ? argv_eol[11] + 1 : argv_eol[11]) : NULL;
- if (argv[10][0] != '0')
- pos_account = argv[10];
-
ptr_channel = irc_channel_search (server, argv[3]);
ptr_nick = (ptr_channel) ?
irc_nick_search (server, ptr_channel, argv[7]) : NULL;