X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsnomasks.cpp;h=e4c02057f5ad890331e4a3d3eb67b02a42780bde;hb=48103a05e75dc208bcd01b62b19ae01158c01b50;hp=1a130fb5aaa4ee3a0dcfb38adc0693ce003d7225;hpb=cd7301e6f90c9fdaf86769b862389090fe4e455a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/snomasks.cpp b/src/snomasks.cpp index 1a130fb5a..e4c02057f 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -127,6 +127,10 @@ void Snomask::Flush() if (this->LastMessage.empty()) return; + ServerInstance->Logs->Log("snomask", DEFAULT, "%s: %s", this->Description.c_str(), this->LastMessage.c_str()); + if (Count > 1) + ServerInstance->Logs->Log("snomask", DEFAULT, "%s: (last message repeated %u times)", this->Description.c_str(), Count); + /* Only opers can receive snotices, so we iterate the oper list */ for (std::list::iterator i = ServerInstance->Users->all_opers.begin(); i != ServerInstance->Users->all_opers.end(); i++) { @@ -134,12 +138,10 @@ void Snomask::Flush() if (IS_LOCAL(a) && a->IsModeSet('s') && a->IsModeSet('n') && a->IsNoticeMaskSet(MySnomask) && !a->quitting) { - a->WriteServ("NOTICE %s :*** %s: %s", a->nick, this->Description.c_str(), this->LastMessage.c_str()); - ServerInstance->Logs->Log("snomask", DEFAULT, "%s: %s", this->Description.c_str(), this->LastMessage.c_str()); + a->WriteServ("NOTICE %s :*** %s: %s", a->nick.c_str(), this->Description.c_str(), this->LastMessage.c_str()); if (Count > 1) { - a->WriteServ("NOTICE %s :*** %s: (last message repeated %u times)", a->nick, this->Description.c_str(), Count); - ServerInstance->Logs->Log("snomask", DEFAULT, "%s: (last message repeated %u times)", this->Description.c_str(), Count); + a->WriteServ("NOTICE %s :*** %s: (last message repeated %u times)", a->nick.c_str(), this->Description.c_str(), Count); } } }