From b0316eb0472aff155feda1b3c9d0c59d44e3dc3e Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 12 Nov 2006 15:59:25 +0000 Subject: Add send_opers event and OPERNOTICE command to send remote server NOTICE git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5708 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree.cpp') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 93996bcdb..a622c2624 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -3402,6 +3402,18 @@ class TreeSocket : public InspSocket } return true; } + else if (command == "OPERNOTICE") + { + std::string sourceserv = this->myhost; + + if (this->InboundServerName != "") + sourceserv = this->InboundServerName; + + if (params.size() >= 1) + Instance->WriteOpers("*** From " + sourceserv + ": " + params[1]); + + return Utils->DoOneToAllButSenderRaw(line, sourceserv, prefix, command, params); + } else if (command == "ENDBURST") { this->bursting = false; @@ -5161,9 +5173,14 @@ class ModuleSpanningTree : public Module { if (params->size() < 2) return; - // Insert the TS value of the object, either userrec or chanrec Utils->DoOneToMany(ServerInstance->Config->ServerName,"MODE",*params); } + else if (event->GetEventID() == "send_opers") + { + if (params->size() < 1) + return; + Utils->DoOneToMany(ServerInstance->Config->ServerName,"OPERNOTICE",*params); + } else if (event->GetEventID() == "send_push") { if (params->size() < 2) -- cgit v1.2.3