public:
ServProtectMode(InspIRCd* Instance) : ModeHandler(Instance, 'k', 0, 0, false, MODETYPE_USER, true) { }
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool)
{
return MODEACTION_DENY;
}
{
bm = new ServProtectMode(ServerInstance);
- if (!ServerInstance->AddMode(bm))
+ if (!ServerInstance->Modes->AddMode(bm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhois, I_OnKill, I_OnWhoisLine };
ServerInstance->Modules->Attach(eventlist, this, 3);
virtual Version GetVersion()
{
- return Version(1,1,0,0,VF_COMMON,API_VERSION);
+ return Version(1,2,0,0,VF_COMMON,API_VERSION);
}
virtual void OnWhois(User* src, User* dst)
if (dst->IsModeSet('k'))
{
- src->WriteServ("485 %s :You are not allowed to kill %s Services!", src->nick, ServerInstance->Config->Network);
+ src->WriteNumeric(485, "%s :You are not allowed to kill %s Services!", src->nick, ServerInstance->Config->Network);
ServerInstance->SNO->WriteToSnoMask('A', std::string(src->nick)+" tried to kill service "+dst->nick+" ("+reason+")");
return 1;
}