diff options
-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++) { |