diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-31 18:06:54 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-31 18:06:54 +0000 |
commit | ca7cb01b7a286f346748986da74b634edfe195c7 (patch) | |
tree | d1c30430205fafa9b94d0036020032ba120cf1c1 /src | |
parent | de08da58f7a8af9f0fae1b98aeee1dfb10fb06fe (diff) |
This one too, grr
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8434 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_dnsbl.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_filter.h | 13 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index b2fb04dd1..cd37b6895 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -118,7 +118,7 @@ class DNSBLResolver : public Resolver if (ServerInstance->XLines->AddLine(kl)) { ServerInstance->XLines->ApplyLines(); - FOREACH_MOD(I_OnAddKLine,OnAddKLine(ConfEntry->duration, NULL, reason, them->GetIPString())); + FOREACH_MOD(I_OnAddKLine,OnAddKLine(ConfEntry->duration, NULL, reason, them->MakeHostIP())); } else delete kl; @@ -131,7 +131,7 @@ class DNSBLResolver : public Resolver if (ServerInstance->XLines->AddLine(gl)) { ServerInstance->XLines->ApplyLines(); - FOREACH_MOD(I_OnAddGLine,OnAddGLine(ConfEntry->duration, NULL, reason, them->GetIPString())); + FOREACH_MOD(I_OnAddGLine,OnAddGLine(ConfEntry->duration, NULL, reason, them->MakeHostIP())); } else delete gl; diff --git a/src/modules/m_filter.h b/src/modules/m_filter.h index 1b65623c5..fc0d97938 100644 --- a/src/modules/m_filter.h +++ b/src/modules/m_filter.h @@ -280,11 +280,14 @@ int FilterBase::OnUserPreNotice(User* user,void* dest,int target_type, std::stri } if (f->action == "gline") { - if (ServerInstance->XLines->AddGLine(f->gline_time, ServerInstance->Config->ServerName, f->reason.c_str(), user->MakeHostIP())) + GLine* gl = new GLine(ServerInstance, ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName, f->reason.c_str(), "*", user->GetIPString()); + if (ServerInstance->XLines->AddLine(gl)) { ServerInstance->XLines->ApplyLines(); FOREACH_MOD(I_OnAddGLine,OnAddGLine(f->gline_time, NULL, f->reason, user->MakeHostIP())); } + else + delete gl; } ServerInstance->Log(DEFAULT,"FILTER: "+std::string(user->nick)+std::string(" had their message filtered, target was ")+target+": "+f->reason+" Action: "+f->action); @@ -365,14 +368,14 @@ int FilterBase::OnPreCommand(const std::string &command, const char** parameters if (f->action == "gline") { /* Note: We gline *@IP so that if their host doesnt resolve the gline still applies. */ - std::string wild = "*@"; - wild.append(user->GetIPString()); - - if (ServerInstance->XLines->AddGLine(f->gline_time, ServerInstance->Config->ServerName, f->reason.c_str(), wild.c_str())) + GLine* gl = new GLine(ServerInstance, ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName, f->reason.c_str(), "*", user->GetIPString()); + if (ServerInstance->XLines->AddLine(gl)) { ServerInstance->XLines->ApplyLines(); FOREACH_MOD(I_OnAddGLine,OnAddGLine(f->gline_time, NULL, f->reason, user->MakeHostIP())); } + else + delete gl; } return 1; } |