diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-02 00:51:12 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-02 00:51:12 +0000 |
commit | 233fb3162db59c00c93986aa7572eca5d07484ff (patch) | |
tree | 5d61b6c45e05c6330f8d21f144ad9e84a0da3456 | |
parent | 95f69d02e9453229867521683824c6b1b7a2acab (diff) |
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
-rw-r--r-- | src/modules/m_dnsbl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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; } |