X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsnomasks.cpp;h=e39fb84fb748f05a131ce75174280c24d86c04f4;hb=daf3be301d0181d14d1310b3ab5f79c8a85dfb46;hp=e0305ea061330120fe1a575a5e0059b6eb93e1ea;hpb=a500ec70bb82151c8fcf7443b4645640233952e8;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/snomasks.cpp b/src/snomasks.cpp index e0305ea06..e39fb84fb 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -21,7 +21,6 @@ #include "inspircd.h" -#include void SnomaskManager::FlushSnotices() { @@ -70,9 +69,8 @@ SnomaskManager::SnomaskManager() EnableSnomask('q',"QUIT"); /* Local quit notices */ EnableSnomask('k',"KILL"); /* Kill notices */ EnableSnomask('o',"OPER"); /* Oper up/down notices */ - EnableSnomask('a',"ANNOUNCEMENT"); /* formerly WriteOpers() - generic notices to all opers */ - EnableSnomask('d',"DEBUG"); /* Debug notices */ - EnableSnomask('x',"XLINE"); /* Xline notice (g/z/q/k/e) */ + EnableSnomask('a',"ANNOUNCEMENT"); /* formerly WriteOpers() - generic notices to all opers */ + EnableSnomask('x',"XLINE"); /* X-line notices (G/Z/Q/K/E/R/SHUN/CBan) */ EnableSnomask('t',"STATS"); /* Local or remote stats request */ } @@ -125,15 +123,12 @@ void Snomask::Flush() void Snomask::Send(char letter, const std::string& desc, const std::string& msg) { - std::string log = desc; - log.append(": ").append(msg); - ServerInstance->Logs->Log("snomask", LOG_DEFAULT, log); + ServerInstance->Logs->Log(desc, LOG_DEFAULT, msg); + const std::string finalmsg = InspIRCd::Format("*** %s: %s", desc.c_str(), msg.c_str()); - std::string finalmsg = "*** "; - finalmsg.append(log); /* Only opers can receive snotices, so we iterate the oper list */ - const std::list& opers = ServerInstance->Users->all_opers; - for (std::list::const_iterator i = opers.begin(); i != opers.end(); ++i) + const UserManager::OperList& opers = ServerInstance->Users->all_opers; + for (UserManager::OperList::const_iterator i = opers.begin(); i != opers.end(); ++i) { User* user = *i; // IsNoticeMaskSet() returns false for opers who aren't +s, no need to check for it seperately