From 49e94a92bc799d03fbaeee7aefec089872dcca0a Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 12 Nov 2006 16:14:44 +0000 Subject: 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 --- src/modules/m_spanningtree.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) 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) -- cgit v1.2.3