diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-17 11:58:31 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-17 11:58:31 +0000 |
commit | a99351314824c53f0809e86582c65ffaf6f928c7 (patch) | |
tree | d0c0e5ea12a19d40f316e53d8414849ba9300312 /src | |
parent | 1ff26bac16487869af7a5e4ebfa1219096c9327b (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/snomasks.cpp | 7 |
1 files 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<User*>::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; } |