make set/badnode and badspotter apply to announces and talks as well
[spider.git] / perl / DXProt.pm
index cab45621fdb22d4f76511040475cbf00c3ba3ccb..ba79e43e0419ffab6a528e62123ba5ae41886929 100644 (file)
@@ -349,6 +349,18 @@ sub normal
                                $to = $field[2];
                        }
 
+                       # if this is a 'nodx' node then ignore it
+                       if ($badnode->in($field[6]) || ($via && $badnode->in($via))) {
+                               dbg("PCPROT: Bad Node, dropped") if isdbg('chanerr');
+                               return;
+                       }
+
+                       # if this is a 'bad spotter' user then ignore it
+                       if ($badspotter->in($from)) {
+                               dbg("PCPROT: Bad Spotter, dropped") if isdbg('chanerr');
+                               return;
+                       }
+
                        # if we are converting announces to talk is it a dup?
                        if ($ann_to_talk) {
                                if (AnnTalk::is_talk_candidate($from, $field[3]) && AnnTalk::dup($from, $to, $field[3])) {
@@ -549,6 +561,18 @@ sub normal
                                }
                        }
 
+                       # if this is a 'nodx' node then ignore it
+                       if ($badnode->in($field[5])) {
+                               dbg("PCPROT: Bad Node, dropped") if isdbg('chanerr');
+                               return;
+                       }
+
+                       # if this is a 'bad spotter' user then ignore it
+                       if ($badspotter->in($field[1])) {
+                               dbg("PCPROT: Bad Spotter, dropped") if isdbg('chanerr');
+                               return;
+                       }
+
                        if ($field[2] eq '*' || $field[2] eq $main::mycall) {