void init()
{
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
// (1) the sender is opered
// (2) the recipient is opered
// anything else, blocked.
- if (IS_OPER(u) || IS_OPER(user))
+ if (u->IsOper() || user->IsOper())
{
return MOD_RES_PASSTHRU;
}
return this->OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
}
- virtual ~ModuleRestrictMsg()
- {
- }
-
virtual Version GetVersion()
{
return Version("Forbids users from messaging each other. Users may still message opers and opers may message other opers.",VF_VENDOR);