diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 10:57:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 10:57:25 +0000 |
commit | d2be3310ba2cfb567f2cf0272a086b2961c86d6f (patch) | |
tree | 743e84c1bab0db4a58b44ff76e1227c23d54106a /src/users.cpp | |
parent | c24fcf728da0f04de9cc03b9ebbd5f85bab65081 (diff) |
Add a call to the NICK handler that allows toggling of allowing invalid nicks to on or off.
Use it in ForceNickChange to allow forced nickchange of a nick to a uid.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7869 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp index b76df8ac5..1c1181689 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1197,7 +1197,15 @@ bool userrec::ForceNickChange(const char* newnick) if (this->registered == REG_ALL) { - return (ServerInstance->Parser->CallHandler("NICK", &newnick, 1, this) == CMD_SUCCESS); + std::deque<classbase*> dummy; + command_t* nickhandler = ServerInstance->Parser->GetHandler("NICK"); + if (nickhandler) + { + nickhandler->HandleInternal(1, dummy); + bool result = (ServerInstance->Parser->CallHandler("NICK", &newnick, 1, this) == CMD_SUCCESS); + nickhandler->HandleInternal(0, dummy); + return result; + } } return false; } |