summaryrefslogtreecommitdiff
path: root/src/snomasks.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-10 22:56:02 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-10 22:56:02 +0000
commit516825e9ddd5f91359ac3cca51e8d8e9070dc96f (patch)
tree0e3e7a2d1e2dd3020063b76fac21a874b520f7e9 /src/snomasks.cpp
parent606aa8f09b64d9b779fe847f7f969b6c456f8343 (diff)
Send (last message repeated N times) snomask to log channel
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11202 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/snomasks.cpp')
-rw-r--r--src/snomasks.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/snomasks.cpp b/src/snomasks.cpp
index 8415dad34..787d98b0a 100644
--- a/src/snomasks.cpp
+++ b/src/snomasks.cpp
@@ -151,7 +151,14 @@ void Snomask::Flush()
{
if (Count > 1)
{
- ServerInstance->Logs->Log("snomask", DEFAULT, "%s: (last message repeated %u times)", this->Description.c_str(), Count);
+ std::string desc = this->Description;
+ std::string mesg = "(last message repeated "+ConvToStr(Count)+" times)";
+ char mysnomask = MySnomask;
+
+ ServerInstance->Logs->Log("snomask", DEFAULT, "%s: %s", desc.c_str(), mesg.c_str());
+
+ FOREACH_MOD(I_OnSendSnotice, OnSendSnotice(mysnomask, desc, mesg));
+
if (!LastBlocked)
{
/* Only opers can receive snotices, so we iterate the oper list */
@@ -160,9 +167,9 @@ void Snomask::Flush()
while (i != ServerInstance->Users->all_opers.end())
{
User* a = *i;
- if (IS_LOCAL(a) && a->IsModeSet('s') && a->IsNoticeMaskSet(MySnomask) && !a->quitting)
+ if (IS_LOCAL(a) && a->IsModeSet('s') && a->IsNoticeMaskSet(mysnomask) && !a->quitting)
{
- a->WriteServ("NOTICE %s :*** %s: (last message repeated %u times)", a->nick.c_str(), this->Description.c_str(), Count);
+ a->WriteServ("NOTICE %s :*** %s: %s", a->nick.c_str(), desc.c_str(), mesg.c_str());
}
i++;