some bugfixes
authorPierre Habouzit <madcoder@debian.org>
Mon, 22 Sep 2003 16:50:14 +0000 (16:50 +0000)
committerPierre Habouzit <madcoder@debian.org>
Mon, 22 Sep 2003 16:50:14 +0000 (16:50 +0000)
philter/philter/include/rule.inc.php

index 1e361be..6bb70f4 100644 (file)
@@ -88,13 +88,16 @@ class Rule {
 
     function to_string() {
         global $philter;
-        $res = ":0 c\n";
+        
+        $res = ($this->block ? ":0\n" : ":0 c\n");
         foreach($this->matches as $match)
             $res .= $philter->['config']['match_plugins'][$match[0]]->to_string($match);
         $res.= "{\n";
         foreach($this->actions as $action)
             $res .= $philter->['config']['actioh_plugins'][$action[0]]->to_string($action);
         $res.= "}\n\n";
+
+        return $res;
     }
 
     function sql_clean($_uid, $_rid) {