From 06fd57cc35c9d5869ca3a24d349b791963b2acc4 Mon Sep 17 00:00:00 2001 From: peavey Date: Tue, 21 Nov 2006 23:22:04 +0000 Subject: 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 --- src/cmd_user.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/cmd_user.cpp') 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; -- cgit v1.3.1-10-gc9f91