staging commt for badword and badip
[spider.git] / perl / cluster.pl
index 9e5976ee92686250a80f53dba340a14380c57101..2cbdee688139498d087762a3e62d9d45c339dccd 100755 (executable)
@@ -301,13 +301,20 @@ sub new_channel
                }
 
                # now deal with the lock
+               my $host = $conn->peerhost;
                if ($lock) {
-                       my $host = $conn->peerhost;
                        LogDbg('', "$call on $host is locked out, disconnected");
                        $conn->disconnect;
                        return;
                }
 
+               # Is he from a badip?
+               if (DXCIDR::find($host)) {
+                       LogDbg('', "$call on $host is from a badip $host, disconnected");
+                       $conn->disconnect;
+                       return;
+               }
+
                # set up the basic channel info for "Normal" Users
                # is there one already connected to me - locally?