From b8d63cd639f98e80c766dd8f00406a2170f0e88f Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 17 Dec 2006 15:24:09 +0000 Subject: Fix this (at last) to only log commands which are operonly git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6036 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_operlog.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp index 0bd6dfc49..4968a8925 100644 --- a/src/modules/m_operlog.cpp +++ b/src/modules/m_operlog.cpp @@ -51,12 +51,15 @@ class ModuleOperLog : public Module if ((*user->oper) && (IS_LOCAL(user)) && (user->HasPermission(command))) { - std::string plist = ""; - for (int j = 0; j < pcnt; j++) + command_t* thiscommand = ServerInstance->Parser->GetHandler(command); + if ((thiscommand) && (thiscommand->flags_needed = 'o')) { - plist.append(std::string(" ")+std::string(parameters[j])); + std::string plist = ""; + for (int j = 0; j < pcnt; j++) + plist.append(std::string(" ")+std::string(parameters[j])); + + ServerInstance->Log(DEFAULT,"OPERLOG: [%s!%s@%s] %s%s",user->nick,user->ident,user->host,command.c_str(),plist.c_str()); } - ServerInstance->Log(DEFAULT,"OPERLOG: [%s!%s@%s] %s%s",user->nick,user->ident,user->host,command.c_str(),plist.c_str()); } return 0; -- cgit v1.2.3