diff options
-rw-r--r-- | include/snomasks.h | 7 | ||||
-rw-r--r-- | src/snomasks.cpp | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/include/snomasks.h b/include/snomasks.h index 2f53443f0..a6a1f2d82 100644 --- a/include/snomasks.h +++ b/include/snomasks.h @@ -25,9 +25,6 @@ class Snomask private: InspIRCd *ServerInstance; - /** Sends out a pending message - */ - void Flush(); public: char MySnomask; std::string Description; @@ -46,6 +43,10 @@ class Snomask /** Sends a message to all opers with this snomask. */ void SendMessage(const std::string &message); + + /** Sends out a pending message + */ + void Flush(); }; /** A list of snomasks which are valid, and their descriptive texts diff --git a/src/snomasks.cpp b/src/snomasks.cpp index 2af5fc801..97de1ebf5 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -30,6 +30,10 @@ SnomaskManager::~SnomaskManager() void SnomaskManager::FlushSnotices() { // stub.. not yet written XXX + for (std::map<char, Snomask *>::iterator i = SnoMasks.begin(); i != SnoMasks.end(); i++) + { + i->second->Flush(); + } } bool SnomaskManager::EnableSnomask(char letter, const std::string &type) @@ -106,7 +110,6 @@ void Snomask::SendMessage(const std::string &message) { this->Flush(); LastMessage = message; - Count = 1; } else { @@ -134,4 +137,7 @@ void Snomask::Flush() } } } + + LastMessage = ""; + Count = 1; } |