summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp10
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;
}