From: brain Date: Fri, 24 Feb 2006 18:45:57 +0000 (+0000) Subject: Now sends out warning when oper on a remote server tries to execute a command that... X-Git-Tag: v2.0.23~8771 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=76bed8d2e82d51e3d9ea2a215ad4cac01fe62c99;p=user%2Fhenk%2Fcode%2Finspircd.git Now sends out warning when oper on a remote server tries to execute a command that the local class tags say they shouldnt be able to access. Helps detect desyncs caused by muppeted configs, or just plain nefarious goings on. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3318 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/command_parse.cpp b/src/command_parse.cpp index a606e572c..18915b819 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -304,6 +304,11 @@ void CommandParser::CallHandler(std::string &commandname,char **parameters, int { n->second->Handle(parameters,pcnt,user); } + else + { + if (!IS_LOCAL(user)) + WriteOpers("*** \2WARNING\2: Command '%s' not allowed for oper '%s', dropped.",commandname.c_str(),user->nick); + } } else { @@ -582,6 +587,8 @@ void CommandParser::ProcessCommand(userrec *user, char* cmd) { log(DEBUG,"permission denied: %s %s",user->nick,command); WriteServ(user->fd,"481 %s :Permission Denied- Oper type %s does not have access to command %s",user->nick,user->oper,command); + if (!IS_LOCAL(user)) + WriteOpers("*** \2WARNING\2: Command '%s' not allowed for oper '%s', dropped.",command,user->nick); cmd_found = 1; return; }