*/
-/* $ModDesc: Gives each oper type a 'level', cannot kill opers 'above' your level. */
-
#include "inspircd.h"
class ModuleOperLevels : public Module
{
public:
- void init() CXX11_OVERRIDE
- {
- ServerInstance->Modules->Attach(I_OnKill, this);
- }
-
Version GetVersion() CXX11_OVERRIDE
{
return Version("Gives each oper type a 'level', cannot kill opers 'above' your level.", VF_VENDOR);
{
if (IS_LOCAL(source)) ServerInstance->SNO->WriteGlobalSno('a', "Oper %s (level %ld) attempted to /kill a higher oper: %s (level %ld): Reason: %s",source->nick.c_str(),source_level,dest->nick.c_str(),dest_level,reason.c_str());
dest->WriteNotice("*** Oper " + source->nick + " attempted to /kill you!");
- source->WriteNumeric(ERR_NOPRIVILEGES, "%s :Permission Denied - Oper %s is a higher level than you",source->nick.c_str(),dest->nick.c_str());
+ source->WriteNumeric(ERR_NOPRIVILEGES, InspIRCd::Format("Permission Denied - Oper %s is a higher level than you", dest->nick.c_str()));
return MOD_RES_DENY;
}
}