/* $ModDesc: An enhanced version of the unreal m_filter.so used by chatspike.net */
-class Filter
+class Filter : public classbase
{
public:
std::string reason;
class FilterException : public ModuleException
{
public:
- virtual char* GetReason()
+ virtual const char* GetReason()
{
return "Could not find <filter file=\"\"> definition in your config file!";
}
return 0;
}
- 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
// to call the constructor again and re-read our data.
}
for (filter_t::iterator n = filters.begin(); n != filters.end(); n++)
{
- delete n->second;
+ DELETE(n->second);
}
filters.clear();
for (int index = 0; index < MyConf->Enumerate("keyword"); index++)
filters[pattern] = x;
}
Srv->Log(DEFAULT,std::string("m_filter: read configuration from ")+filterfile);
- delete Conf;
- delete MyConf;
+ DELETE(Conf);
+ DELETE(MyConf);
}
virtual Version GetVersion()