diff --git a/Changes b/Changes index c0450fd4c..a72174579 100644 --- a/Changes +++ b/Changes @@ -3281,3 +3281,5 @@ This is the 3.2 fixes branch. - Fixed find_qline crashes regarding except tkl 'type qline', reported by Gilou (#0001882). - Fixed some CIDR bugs causing things not to match. - Fixed a CIDR bug when compiled without IPv6 support +- Fixed an SVSNICK bug that could lead to duplicate users in very rare circumstances + (#0001874) reported by Jiuka. diff --git a/src/modules/m_svsnick.c b/src/modules/m_svsnick.c index 7f8417b3d..b19647ea3 100644 --- a/src/modules/m_svsnick.c +++ b/src/modules/m_svsnick.c @@ -97,14 +97,14 @@ int m_svsnick(aClient *cptr, aClient *sptr, int parc, char *parv[]) if (!hunt_server_token(cptr, sptr, MSG_SVSNICK, TOK_SVSNICK, "%s %s :%s", 1, parc, parv) != HUNTED_ISME) { + if (do_nick_name(parv[2]) == 0) + return 0; if ((acptr = find_person(parv[1], NULL))) { if (find_client(parv[2], NULL)) /* Collision */ return exit_client(cptr, acptr, sptr, "Nickname collision due to Services enforced " "nickname change, your nick was overruled"); - if (do_nick_name(parv[2]) == 0) - return 0; acptr->umodes &= ~UMODE_REGNICK; acptr->lastnick = TS2ts(parv[3]); sendto_common_channels(acptr, ":%s NICK :%s", parv[1],