From 8ae3acb491f07b4dc844dc7973efccdc6ca6a233 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 18 Mar 2026 19:15:05 -0400 Subject: Temporary fix for "USER: Not enough parameters". --- src/irc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/irc.c') diff --git a/src/irc.c b/src/irc.c index 4ea37a3..6f6b2f0 100644 --- a/src/irc.c +++ b/src/irc.c @@ -273,6 +273,17 @@ static void do_join(void) { } static void do_nick(void) { + /* Do not overwrite conf->nick with bogus data! sometimes when + we get disconnected, upon reconnect we get a partial message. + if it's a NICK, missing its destination argument, we end up + blowing away conf->nick, and subsequent reconnect attempts + fail with "USER: not enough parameters". This is purely + a band-aid; a proper solution involves rewriting parse_msg() + so it knows how many args each msg type needs, and refuses to + parse invalid ones. */ + if(!msg_dest || !*msg_dest || *msg_dest == ' ') + return; + // ind_act_none(); if(streq_i(conf->nick, msg_src)) { scr_print_active("You are "); -- cgit v1.2.3