From 362ec0b08d5af32f0cbfaec3edc1e7234dc39f6e Mon Sep 17 00:00:00 2001 From: stskeeps Date: Sat, 16 Sep 2000 19:39:33 +0000 Subject: [PATCH] +- Fixed the passwd NICK problem --- Changes | 1 + src/s_user.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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))