* +------------------------------------+
*
* InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- * E-mail:
+ * E-mail:
* <brain@chatspike.net>
* <Craig@chatspike.net>
*
class CensorException : public ModuleException
{
public:
- virtual char* GetReason()
+ virtual const char* GetReason()
{
return "Could not find <censor file=\"\"> definition in your config file!";
}
}
- virtual void On005Numeric(std::string &output)
- {
+ virtual void On005Numeric(std::string &output)
+ {
InsertMode(output,"G",4);
- }
+ }
virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms)
else if (target_type == TYPE_CHANNEL)
{
chanrec* t = (chanrec*)dest;
- active = (t->IsCustomModeSet('G'));
+ active = (t->IsModeSet('G'));
}
if (active)
return OnUserPreMessage(user,dest,target_type,text,status);
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string ¶meter)
{
/*
* reload our config file on rehash - we must destroy and re-allocate the classes
throw(e);
}
censors.clear();
- for (int index = 0; index < MyConf->Enumerate("badword"); index++)
- {
- irc::string pattern = (MyConf->ReadValue("badword","text",index)).c_str();
- irc::string replace = (MyConf->ReadValue("badword","replace",index)).c_str();
+ for (int index = 0; index < MyConf->Enumerate("badword"); index++)
+ {
+ irc::string pattern = (MyConf->ReadValue("badword","text",index)).c_str();
+ irc::string replace = (MyConf->ReadValue("badword","replace",index)).c_str();
censors[pattern] = replace;
}
- delete Conf;
- delete MyConf;
+ DELETE(Conf);
+ DELETE(MyConf);
}
virtual Version GetVersion()