* Module coded by Craized /* Add a "_" at the beginning of the file (w_lookup.php) if you do not want it to be loaded. */ $w_lookup = new Status($bot); $cron["2sec"][] = &$w_lookup; /* The Class itself... */ class Status { var $bot; /* Constructor: Hands over a referance to the "Bot" class. */ function Status (&$bot) { $this -> bot = &$bot; $this -> bot -> highlight_color = !$this -> bot -> highlight_color ? '' : ''; } } function cron() { $handle = mysql_query("SELECT * FROM w_lookup"); while(TRUE===($f[] = mysql_fetch_array($handle))); if(isset($f)) { foreach($f as $key=>$value) { $status = $this -> bot -> lookup($value['name']); $status != $value['status'] ? mysql_query("UPDATE w_lookup SET status='".$status."' WHERE id='".$value['id']."' LIMIT 1") : NULL; } } } ?>