From ddb970dd670bcd905c8f34458f8fcf70e9fd89bd Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 19 Feb 2007 08:38:26 +0000 Subject: 1) Fix for nickname overruled with new cullList stuff -- we have to change their nick, its not safe to quit them as it messes up the nick hash. 2) Add a mute flag for users, so we can drop commands from users who have been placed on the cullList. This is independent of the actual cullList and can be used as a general mute flag e.g. by shun modules. 3) Fix /kill to also not quit the user immediately, remove need for CMD_USER_DELETED return anywhere in the code. *** THIS NEEDS TESTING BY QA *** git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6596 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 259d636d3..f84df3342 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -153,8 +153,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p new_parameters[splithere] = item.c_str(); new_parameters[extra] = extrastuff.c_str(); - if (CommandObj->Handle(new_parameters,pcnt,user) == CMD_USER_DELETED) - return 1; + CommandObj->Handle(new_parameters,pcnt,user); dupes[item.c_str()] = true; } @@ -198,8 +197,7 @@ int CommandParser::LoopCall(userrec* user, command_t* CommandObj, const char** p * record out from under us (e.g. if we /kill a comma sep list, and we're * in that list ourselves) abort if we're gone. */ - if (CommandObj->Handle(new_parameters,pcnt,user) == CMD_USER_DELETED) - return 1; + CommandObj->Handle(new_parameters,pcnt,user); dupes[item.c_str()] = true; } @@ -344,10 +342,7 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd) */ CmdResult result = cm->second->Handle(command_p,items,user); - if (result != CMD_USER_DELETED) - { - FOREACH_MOD(I_OnPostCommand,OnPostCommand(command, command_p, items, user, result,cmd)); - } + FOREACH_MOD(I_OnPostCommand,OnPostCommand(command, command_p, items, user, result,cmd)); return; } else @@ -407,8 +402,11 @@ void CommandParser::ProcessBuffer(std::string &buffer,userrec *user) if (buffer.length()) { - ServerInstance->Log(DEBUG,"-> :%s %s",user->nick,buffer.c_str()); - this->ProcessCommand(user,buffer); + if (!user->muted) + { + ServerInstance->Log(DEBUG,"-> :%s %s",user->nick,buffer.c_str()); + this->ProcessCommand(user,buffer); + } } } -- cgit v1.2.3