From a99351314824c53f0809e86582c65ffaf6f928c7 Mon Sep 17 00:00:00 2001 From: w00t Date: Thu, 17 Apr 2008 11:58:31 +0000 Subject: Remove debug from snomask flushing, and send ALL snotices globally automagically (this probably means that calling SendSNONotice calls can be removed from places where they were added individually. XXX this needs fixing in two places: some snomasks are entirely local (local connect/quit) and some individual snotices may wish to be local only (though I can't think of any right now) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9525 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/snomasks.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/snomasks.cpp b/src/snomasks.cpp index 6385af9c0..08b98c002 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -122,14 +122,13 @@ void Snomask::Flush() if (this->LastMessage.empty()) return; - ServerInstance->Logs->Log("SNOMASK", DEBUG, "Flushing snomask %s", this->Description.c_str()); - /* 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++) { User* a = *i; 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()); if (Count > 1) { @@ -138,6 +137,10 @@ void Snomask::Flush() } } + ServerInstance->PI->SendSNONotice(MySnomask, this->Description + ": " + this->LastMessage); + if (Count > 1) + ServerInstance->PI->SendSNONotice(MySnomask, this->Description + ": (last message repeated " + Count + " times)"); + LastMessage = ""; Count = 1; } -- cgit v1.2.3