}
function to_string() {
- return "";
+ global $philter;
+ $tmp = array();
+
+ foreach($this->matches as $match)
+ $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['action_plugins'][$action[0]]->to_string($action);
+
+ if($this->block)
+ $res .= " exit\n";
+
+ return $res."}\n\n";
}
function sql_clean($_uid, $_rid) {