summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-12 16:14:44 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-12 16:14:44 +0000
commit49e94a92bc799d03fbaeee7aefec089872dcca0a (patch)
treeafabe4fa0295aa0d608ba5877fc5b5dd719664c5 /src/modules/m_spanningtree.cpp
parentaf3624e16e2c8fc4bc080c53cf46559ed05f8404 (diff)
More funky stuff, SNONOTICE, MODENOTICE to go with OPERNOTICE
(OPERNOTICE can be considered to be "MODENOTICE os", but it saves bandwidth and cpu to send OPERNOTICE where possible) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5713 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index e2543c05e..3a04c4af6 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -3414,6 +3414,30 @@ class TreeSocket : public InspSocket
return Utils->DoOneToAllButSenderRaw(line, sourceserv, prefix, command, params);
}
+ else if (command == "MODENOTICE")
+ {
+ std::string sourceserv = this->myhost;
+ if (this->InboundServerName != "")
+ sourceserv = this->InboundServerName;
+ if (params.size() >= 2)
+ {
+ Instance->WriteMode(params[0].c_str(), WM_AND, "*** From %s: %s", sourceserv.c_str(), params[1].c_str());
+ }
+
+ return Utils->DoOneToAllButSenderRaw(line, sourceserv, prefix, command, params);
+ }
+ else if (command == "SNONOTICE")
+ {
+ std::string sourceserv = this->myhost;
+ if (this->InboundServerName != "")
+ sourceserv = this->InboundServerName;
+ if (params.size() >= 2)
+ {
+ Instance->SNO->WriteToSnoMask(*(params[0].c_str()), "From " + sourceserv + ": "+ params[1]);
+ }
+
+ return Utils->DoOneToAllButSenderRaw(line, sourceserv, prefix, command, params);
+ }
else if (command == "ENDBURST")
{
this->bursting = false;
@@ -5182,6 +5206,20 @@ class ModuleSpanningTree : public Module
(*params)[0] = ":" + (*params)[0];
Utils->DoOneToMany(ServerInstance->Config->ServerName,"OPERNOTICE",*params);
}
+ else if (event->GetEventID() == "send_modeset")
+ {
+ if (params->size() < 2)
+ return;
+ (*params)[1] = ":" + (*params)[1];
+ Utils->DoOneToMany(ServerInstance->Config->ServerName,"MODENOTICE",*params);
+ }
+ else if (event->GetEventID() == "send_snoset")
+ {
+ if (params->size() < 2)
+ return;
+ (*params)[1] = ":" + (*params)[1];
+ Utils->DoOneToMany(ServerInstance->Config->ServerName,"SNONOTICE",*params);
+ }
else if (event->GetEventID() == "send_push")
{
if (params->size() < 2)