summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-29 17:12:47 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-29 17:12:47 +0000
commit6a51a8cfae315aa33e154b0c0ec5a75f6a880134 (patch)
tree9021d778ae471216b57be1a1e8ecc16c12389bc7 /src
parentde6a9294e350a7339e280ab3e8a5f4c8d1343660 (diff)
Added OnOper and OnMode to module
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2011 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree.cpp23
1 files changed, 23 insertions, 0 deletions
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<std::string> params;
+ params.push_back(u->nick);
+ params.push_back(text);
+ DoOneToMany(user->nick,"MODE",params);
+ }
+ else
+ {
+ chanrec* c = (chanrec*)dest;
+ std::deque<std::string> params;
+ params.push_back(c->name);
+ params.push_back(text);
+ DoOneToMany(user->nick,"MODE",params);
+ }
+ }
+ }
+
virtual ~ModuleSpanningTree()
{
delete Srv;