/** Handle /OPERMOTD
*/
-class cmd_opermotd : public Command
+class CommandOpermotd : public Command
{
public:
- cmd_opermotd (InspIRCd* Instance) : Command(Instance,"OPERMOTD", 'o', 0)
+ CommandOpermotd (InspIRCd* Instance) : Command(Instance,"OPERMOTD", 'o', 0)
{
this->source = "m_opermotd.so";
syntax = "[<servername>]";
class ModuleOpermotd : public Module
{
- cmd_opermotd* mycommand;
+ CommandOpermotd* mycommand;
public:
void LoadOperMOTD()
opermotd = NULL;
}
opermotd = new FileReader(ServerInstance, filename);
- DELETE(conf);
+ delete conf;
}
ModuleOpermotd(InspIRCd* Me)
: Module(Me)
{
opermotd = NULL;
- mycommand = new cmd_opermotd(ServerInstance);
+ mycommand = new CommandOpermotd(ServerInstance);
ServerInstance->AddCommand(mycommand);
opermotd = new FileReader(ServerInstance);
LoadOperMOTD();
+ Implementation eventlist[] = { I_OnRehash, I_OnOper };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
}
virtual ~ModuleOpermotd()