summaryrefslogtreecommitdiff
path: root/src/coremods/core_user/cmd_user.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/coremods/core_user/cmd_user.cpp')
-rw-r--r--src/coremods/core_user/cmd_user.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/coremods/core_user/cmd_user.cpp b/src/coremods/core_user/cmd_user.cpp
index 6de762e44..d593d7f4b 100644
--- a/src/coremods/core_user/cmd_user.cpp
+++ b/src/coremods/core_user/cmd_user.cpp
@@ -62,15 +62,19 @@ CmdResult CommandUser::HandleLocal(const std::vector<std::string>& parameters, L
}
/* parameters 2 and 3 are local and remote hosts, and are ignored */
+ return CheckRegister(user);
+}
+
+CmdResult CommandUser::CheckRegister(LocalUser* user)
+{
+ // If the user is registered, return CMD_SUCCESS/CMD_FAILURE depending on what modules say, otherwise just
+ // return CMD_SUCCESS without doing anything, knowing the other handler will call us again
if (user->registered == REG_NICKUSER)
{
ModResult MOD_RESULT;
-
- /* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */
FIRST_MOD_RESULT(OnUserRegister, MOD_RESULT, (user));
if (MOD_RESULT == MOD_RES_DENY)
return CMD_FAILURE;
-
}
return CMD_SUCCESS;