diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-31 19:52:34 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-03-31 19:54:26 +0200 |
commit | 10b2fa3a6180dec90ccd4dab58fd750dcdf80f82 (patch) | |
tree | 60ecfe36dd9c3035bab71a7120d403cad7ecff97 /src | |
parent | 7558fe7c1b28bdadf7e3bdd47938b1d1a6feb212 (diff) | |
download | weechat-10b2fa3a6180dec90ccd4dab58fd750dcdf80f82.zip |
irc: fix target buffer for commands 432/433 when the nickname looks like a channel
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index e9e430cf4..6ce3e7629 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -1395,7 +1395,9 @@ IRC_PROTOCOL_CALLBACK(generic_error) if (params[arg_error + 1]) { - if (irc_channel_is_channel (server, params[arg_error])) + if ((strcmp (command, "432") != 0) + && (strcmp (command, "433") != 0) + && irc_channel_is_channel (server, params[arg_error])) { pos_channel = params[arg_error]; ptr_channel = irc_channel_search (server, pos_channel); @@ -6519,8 +6521,11 @@ IRC_PROTOCOL_CALLBACK(368) /* * Callback for the IRC command "432": erroneous nickname. * - * Command looks like: - * 432 * mynick :Erroneous Nickname + * Command looks like (not connected to server): + * 432 * nick :Erroneous Nickname + * + * Command looks like (connected to server): + * 432 mynick nick :Erroneous Nickname */ IRC_PROTOCOL_CALLBACK(432) @@ -6568,8 +6573,11 @@ IRC_PROTOCOL_CALLBACK(432) /* * Callback for the IRC command "433": nickname already in use. * - * Command looks like: - * 433 * mynick :Nickname is already in use. + * Command looks like (not connected to server): + * 433 * nick :Nickname is already in use. + * + * Command looks like (connected to server): + * 433 mynick nick :Nickname is already in use. */ IRC_PROTOCOL_CALLBACK(433) |