function to_string() {
global $philter;
-
- $res = ($this->block ? ":0\n" : ":0 c\n");
+ $tmp = array();
+
foreach($this->matches as $match)
- $res .= $philter->config['match_plugins'][$match[0]]->to_string($match);
- $res.= "{\n";
+ $tmp[] = $philter->config['match_plugins'][$match[0]]->to_string($match);
+
+ $connector = ($this->all ? ' && ' : ' || ');
+ $res = "if( ".implode($connector, $tmp)." )\n"
+ . "{\n";
+
foreach($this->actions as $action)
- $res .= $philter->config['actioh_plugins'][$action[0]]->to_string($action);
- $res.= "}\n\n";
+ $res .= $philter->config['action_plugins'][$action[0]]->to_string($action);
- return $res;
+ if($this->block)
+ $res .= " exit\n";
+
+ return $res."}\n\n";
}
function sql_clean($_uid, $_rid) {