summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-05-16 13:15:45 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-05-16 13:15:45 +0200
commit2a3d98c996eeefcaed1559eebfadc74146e0be53 (patch)
treeb4ce178986ada6ed631c9df0088f8fa41f16a676 /src/plugins
parent8d35e67dd6bb6c8d20c71d9f78060cb9dbded98c (diff)
downloadweechat-2a3d98c996eeefcaed1559eebfadc74146e0be53.zip
irc: display command 437 on server buffer when nickname cannot change while banned on channel (closes #88)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-protocol.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 6da8efce4..73424482a 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -1511,7 +1511,7 @@ IRC_PROTOCOL_CALLBACK(error)
IRC_PROTOCOL_CALLBACK(generic_error)
{
- int arg_error;
+ int arg_error, force_server_buffer;
char *str_error, str_target[512];
const char *pos_channel, *pos_nick;
struct t_irc_channel *ptr_channel;
@@ -1529,8 +1529,16 @@ IRC_PROTOCOL_CALLBACK(generic_error)
if (params[arg_error + 1])
{
- if ((strcmp (command, "432") != 0)
- && (strcmp (command, "433") != 0)
+ /*
+ * force display on server buffer for these messages:
+ * - 432: erroneous nickname
+ * - 433: nickname already in use
+ * - 437: nick/channel temporarily unavailable
+ */
+ force_server_buffer = ((strcmp (command, "432") == 0)
+ || (strcmp (command, "433") == 0)
+ || (strcmp (command, "437") == 0));
+ if (!force_server_buffer
&& irc_channel_is_channel (server, params[arg_error]))
{
pos_channel = params[arg_error];