From 233fb3162db59c00c93986aa7572eca5d07484ff Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:51:12 +0000 Subject: Add ident change action to m_dnsbl [patch by cytrix] git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11644 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_dnsbl.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index f70496d68..b9e4545b5 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -27,7 +27,7 @@ class DNSBLConfEntry : public classbase { public: - enum EnumBanaction { I_UNKNOWN, I_KILL, I_ZLINE, I_KLINE, I_GLINE }; + enum EnumBanaction { I_UNKNOWN, I_KILL, I_ZLINE, I_KLINE, I_GLINE, I_CIDENT }; enum EnumType { A_RECORD, A_BITMASK }; std::string name, domain, reason; EnumBanaction banaction; @@ -107,6 +107,12 @@ class DNSBLResolver : public Resolver ServerInstance->Users->QuitUser(them, std::string("Killed (") + reason + ")"); break; } + case DNSBLConfEntry::I_CIDENT: + { + them->WriteServ("304 " + them->nick + " :Your ident has been set to " + ConfEntry->name + " because you matched " + reason); + them->ChangeIdent(ConfEntry->name.c_str()); + break; + } case DNSBLConfEntry::I_KLINE: { KLine* kl = new KLine(ServerInstance, ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), @@ -193,6 +199,9 @@ class ModuleDNSBL : public Module return DNSBLConfEntry::I_ZLINE; if(action.compare("GLINE")==0) return DNSBLConfEntry::I_GLINE; + if(action.compare("IDENT")==0) + return DNSBLConfEntry::I_CIDENT; + return DNSBLConfEntry::I_UNKNOWN; } -- cgit v1.2.3