lib = $lib; $this->db = $this->lib->game->db; } function run($uid, $what) { if (class_exists('tracking') && !is_null(tracking::$dbId)) { $track = tracking::$dbId; } else { $track = 'NULL'; } if (gettype($_SERVER['REMOTE_ADDR']) == 'NULL') { $addr = 'AUTO'; } else { $addr = addslashes($_SERVER['REMOTE_ADDR']); } switch ($what) : case 'I': case 'i': $w = 'IN'; break; case 'O': case 'o': $w = 'OUT'; break; case 'C': case 'c': $w = 'CREATE'; break; case 'V': case 'v': $w = 'CONF'; break; case 'Q': case 'q': $w = 'QUIT'; break; case 'Q': case 'q': $w = 'QUIT'; break; case 'VS': case 'vs': $w = 'VSTART'; break; case 'VE': case 've': $w = 'VEND'; break; default: return; endswitch; $this->db->query("INSERT INTO account_log(tracking,account,ip_addr,action) VALUES ($track,$uid,'$addr','$w')"); } } ?>