FLAG_NOTICE = 16
};
-class FilterResult : public classbase
+class FilterResult
{
public:
std::string freeform;
virtual ModResult OnStats(char symbol, User* user, string_list &results) = 0;
virtual ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, User *user, bool validated, const std::string &original_line);
bool AppliesToMe(User* user, FilterResult* filter, int flags);
- void OnLoadModule(Module* mod, const std::string& name);
+ void OnLoadModule(Module* mod);
virtual void ReadFilters(ConfigReader &MyConf) = 0;
};
}
if (f->action == "gline")
{
- GLine* gl = new GLine(ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName, f->reason.c_str(), "*", user->GetIPString());
+ GLine* gl = new GLine(ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName.c_str(), f->reason.c_str(), "*", user->GetIPString());
if (ServerInstance->XLines->AddLine(gl,NULL))
{
ServerInstance->XLines->ApplyLines();
if (f->action == "gline")
{
/* Note: We gline *@IP so that if their host doesnt resolve the gline still applies. */
- GLine* gl = new GLine(ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName, f->reason.c_str(), "*", user->GetIPString());
+ GLine* gl = new GLine(ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName.c_str(), f->reason.c_str(), "*", user->GetIPString());
if (ServerInstance->XLines->AddLine(gl,NULL))
{
ServerInstance->XLines->ApplyLines();
{
for (modulelist::iterator i = ml->begin(); i != ml->end(); ++i)
{
- if (RegexNameRequest(this, *i).Send() == newrxengine)
+ if (RegexNameRequest(this, *i).result == newrxengine)
{
ServerInstance->SNO->WriteGlobalSno('a', "Filter now using engine '%s'", RegexEngine.c_str());
rxengine = *i;
}
}
-void FilterBase::OnLoadModule(Module* mod, const std::string& name)
+void FilterBase::OnLoadModule(Module* mod)
{
if (ServerInstance->Modules->ModuleHasInterface(mod, "RegularExpression"))
{
- std::string rxname = RegexNameRequest(this, mod).Send();
+ std::string rxname = RegexNameRequest(this, mod).result;
if (rxname == RegexEngine)
{
rxengine = mod;
Version FilterBase::GetVersion()
{
- return Version("Text (spam) filtering", VF_VENDOR | VF_COMMON, API_VERSION);
+ return Version("Text (spam) filtering", VF_VENDOR | VF_COMMON);
}