X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_operlog.cpp;h=8188c49b18289813b7f640215fe3e4a6e22fb51d;hb=2330fc9ddd48c939e894e7e37e9bb2e62eafc38d;hp=a84629388b29091202ca26c999714d1375785507;hpb=433e9777236f877469549f10d7232cf16197c9ba;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp index a84629388..8188c49b1 100644 --- a/src/modules/m_operlog.cpp +++ b/src/modules/m_operlog.cpp @@ -49,18 +49,18 @@ class ModuleOperLog : public Module List[I_OnPreCommand] = List[I_On005Numeric] = 1; } - virtual int OnPreCommand(const std::string &command, char **parameters, int pcnt, userrec *user, bool validated) + virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated) { /* If the command doesnt appear to be valid, we dont want to mess with it. */ if (!validated) return 0; - if (*user->oper) + if ((*user->oper) && (IS_LOCAL(user)) && (user->HasPermission(command))) { std::string plist = ""; for (int j = 0; j < pcnt; j++) { - plist.append(" "+parameters[j]); + plist.append(std::string(" ")+std::string(parameters[j])); } log(DEFAULT,"OPERLOG: [%s!%s@%s] %s%s",user->nick,user->ident,user->host,command.c_str(),plist.c_str()); }