mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 19:19:02 -04:00
Added OnOper and OnMode to module
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2011 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
de6a9294e3
commit
6a51a8cfae
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user