From 6a51a8cfae315aa33e154b0c0ec5a75f6a880134 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 29 Nov 2005 17:12:47 +0000 Subject: Added OnOper and OnMode to module git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2011 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 38b1f7784..fd0f772ab 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1390,6 +1390,29 @@ class ModuleSpanningTree : public Module } } + virtual void OnMode(userrec* user, void* dest, int target_type, std::string text) + { + if (std::string(user->server) == Srv->GetServerName()) + { + if (target_type == TYPE_USER) + { + userrec* u = (userrec*)dest; + std::deque params; + params.push_back(u->nick); + params.push_back(text); + DoOneToMany(user->nick,"MODE",params); + } + else + { + chanrec* c = (chanrec*)dest; + std::deque params; + params.push_back(c->name); + params.push_back(text); + DoOneToMany(user->nick,"MODE",params); + } + } + } + virtual ~ModuleSpanningTree() { delete Srv; -- cgit v1.2.3