- ConfigReader* conf = new ConfigReader(ServerInstance);
- std::string filename;
- filename = conf->ReadValue("opermotd","file",0);
- if (opermotd)
- {
- delete opermotd;
- opermotd = NULL;
- }
- opermotd = new FileReader(ServerInstance, filename);
- delete conf;
- }
-
- ModuleOpermotd(InspIRCd* Me)
- : Module(Me)
- {
- opermotd = NULL;
- mycommand = new CommandOpermotd(ServerInstance);
- ServerInstance->AddCommand(mycommand);
- opermotd = new FileReader(ServerInstance);
- LoadOperMOTD();
- Implementation eventlist[] = { I_OnRehash, I_OnOper };
- ServerInstance->Modules->Attach(eventlist, this, 2);