diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-25 21:58:24 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-25 21:58:24 +0000 |
commit | 90f6431603714f3c2abbe44550bca8824bb8bbe6 (patch) | |
tree | 912c619a6cc3e86e1d2f5cdcb24623b73c589200 /src | |
parent | 55b6e0438d504449e8b2e97cbc52f17117b29fe5 (diff) |
Fixed issue with nick changes showing the new nick as non-existing.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1796 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/users.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/users.c b/src/users.c index b437ae80d..3a00415ef 100644 --- a/src/users.c +++ b/src/users.c @@ -84,7 +84,10 @@ void User::SetNewNick(const std::string &newnick) throw "User::SetNewNick() got a bad argument"; } - is_same = (!stricmp(this->nick, nick) ? 1 : 0); + if (debug) + alog("debug: %s changed nick to %s", this->nick, newnick.c_str()); + + is_same = (!stricmp(this->nick, newnick.c_str()) ? 1 : 0); if (this->prev) this->prev->next = this->next; @@ -94,7 +97,7 @@ void User::SetNewNick(const std::string &newnick) if (this->next) this->next->prev = this->prev; - strscpy(this->nick, nick, NICKMAX); + strscpy(this->nick, newnick.c_str(), NICKMAX); list = &userlist[HASH(this->nick)]; this->next = *list; this->prev = NULL; @@ -108,13 +111,11 @@ void User::SetNewNick(const std::string &newnick) { if (this->na) this->na->u = NULL; - this->na = findnick(nick); + this->na = findnick(this->nick); if (this->na) this->na->u = this; } - if (debug) - alog("debug: %s changed nick to %s", this->nick, newnick.c_str()); } void User::SetDisplayedHost(const std::string &shost) |