diff options
| -rw-r--r-- | src/irc.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 "); |
