]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add ident change action to m_dnsbl [patch by cytrix]
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 2 Sep 2009 00:51:12 +0000 (00:51 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 2 Sep 2009 00:51:12 +0000 (00:51 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11644 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_dnsbl.cpp

index f70496d687546221144edf4adec15c7c5a721bdd..b9e4545b5ca3923cc707d8f04f776e8be73a8fce 100644 (file)
@@ -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;
        }