bool active;
CommandSamode(Module* Creator) : Command(Creator,"SAMODE", 2)
{
+ allow_empty_last_param = false;
flags_needed = 'o'; Penalty = 0; syntax = "<target> <modes> {<mode-parameters>}";
active = false;
}
this->active = true;
ServerInstance->Parser->CallHandler("MODE", parameters, user);
if (ServerInstance->Modes->GetLastParse().length())
- ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick) + " used SAMODE: " +ServerInstance->Modes->GetLastParse());
+ ServerInstance->SNO->WriteGlobalSno('a', user->nick + " used SAMODE: " +ServerInstance->Modes->GetLastParse());
this->active = false;
return CMD_SUCCESS;
}
ModuleSaMode()
: cmd(this)
{
- ServerInstance->AddCommand(&cmd);
+ }
+
+ void init()
+ {
+ ServerInstance->Modules->AddService(cmd);
ServerInstance->Modules->Attach(I_OnPreMode, this);
}