From 8faa6ac77378e39de2dbca64a2c54a484db8f77d Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 25 Jun 2018 14:21:49 +0100 Subject: Log snotices with their description rather than just as "snomask". --- docs/conf/inspircd.conf.example | 1 - src/snomasks.cpp | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index d97837d39..d1e752840 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -868,7 +868,6 @@ # - USERS - information relating to user connection and disconnection # - OPER - succesful and failed oper attempts # - KILL - kill related messages -# - snomask - server notices (*all* snomasks will be logged) # - FILTER - messages related to filter matches (filter module) # - CONFIG - configuration related messages # - COMMAND - die and restart messages, and messages related to unknown user types diff --git a/src/snomasks.cpp b/src/snomasks.cpp index fd6a2709a..98f16528e 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -124,12 +124,9 @@ 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 UserManager::OperList& opers = ServerInstance->Users->all_opers; for (UserManager::OperList::const_iterator i = opers.begin(); i != opers.end(); ++i) -- cgit v1.2.3