diff --git a/Changes b/Changes index b0014d92c..95af084e2 100644 --- a/Changes +++ b/Changes @@ -627,3 +627,4 @@ - Possible fixed the SJOIN kick bug (mode +Q), servers can now always kick - Added NEW DNS resolver (Win32 Only atm) ... use by defining NEWDNS - FIXED "BUG" caused by NEWDNS *shrug* +- Fixed the passwd NICK problem diff --git a/src/s_user.c b/src/s_user.c index 574de4d30..04d305050 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -1611,8 +1611,12 @@ int m_nick(cptr, sptr, parc, parv) * - originally by taz, modified by Wizzu */ if ((parc > 2) && (strlen(parv[2]) < sizeof(sptr->passwd))) + { + if (sptr->passwd) + MyFree(sptr->passwd); + sptr->passwd = MyMalloc(strlen(parv[2]) + 1); (void)strcpy(sptr->passwd, parv[2]); - + } /* This had to be copied here to avoid problems.. */ (void)strcpy(sptr->name, nick); if (sptr->user && IsNotSpoof(sptr))