diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-05 16:06:21 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-05 16:06:21 +0000 |
commit | d138843fe0b95bbb1d58baf8c0886a6b3622d0d0 (patch) | |
tree | 4279df341c5a560919cc7d2221a4671cac23fc31 | |
parent | 1c774ea51f6799ca18a1028486f2812fe487ebdc (diff) |
Fix snomask stacking, still needs to flush all snomasks on a timer to avoid messages getting too stacked up..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8638 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/snomasks.h | 1 | ||||
-rw-r--r-- | src/snomasks.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/snomasks.h b/include/snomasks.h index 4545c1ed7..2f53443f0 100644 --- a/include/snomasks.h +++ b/include/snomasks.h @@ -38,6 +38,7 @@ class Snomask */ Snomask(InspIRCd* Instance, char snomask, const std::string &description) { + ServerInstance = Instance; MySnomask = snomask; Description = description; } diff --git a/src/snomasks.cpp b/src/snomasks.cpp index f922703f2..2af5fc801 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -116,6 +116,11 @@ void Snomask::SendMessage(const std::string &message) void Snomask::Flush() { + if (this->LastMessage.empty()) + return; + + ServerInstance->Log(DEBUG, "Flusing snomask %s", this->Description.c_str()); + /* Only opers can receive snotices, so we iterate the oper list */ for (std::list<User*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++) { |