summaryrefslogtreecommitdiff
path: root/src/cmd_user.cpp
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-21 23:22:04 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-21 23:22:04 +0000
commit06fd57cc35c9d5869ca3a24d349b791963b2acc4 (patch)
tree14a968c830b6941dd766e9d3ddd71435e82e9e24 /src/cmd_user.cpp
parent97cf2d2384e255d8e77af7b70fdc057461b83c38 (diff)
fix for bug #175, change OnUserRegister to return int, and if greater than 0 = user was quit and stop propagating to rest of loaded modules. Also bumb the module API version.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5783 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_user.cpp')
-rw-r--r--src/cmd_user.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd_user.cpp b/src/cmd_user.cpp
index 208e04380..66ee2c75d 100644
--- a/src/cmd_user.cpp
+++ b/src/cmd_user.cpp
@@ -54,10 +54,14 @@ CmdResult cmd_user::Handle (const char** parameters, int pcnt, userrec *user)
/* parameters 2 and 3 are local and remote hosts, ignored when sent by client connection */
if (user->registered == REG_NICKUSER)
{
+ int MOD_RESULT = 0;
/* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */
if (ServerInstance->next_call > ServerInstance->Time() + ServerInstance->Config->dns_timeout)
ServerInstance->next_call = ServerInstance->Time() + ServerInstance->Config->dns_timeout;
- FOREACH_MOD(I_OnUserRegister,OnUserRegister(user));
+ FOREACH_RESULT(I_OnUserRegister,OnUserRegister(user));
+ if (MOD_RESULT > 0)
+ return CMD_FAILURE;
+
}
return CMD_SUCCESS;