1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30:
|
<?php
// anti cheat module for custom methods to detect players who are cheating // // function ac_check returns true, if the user seems to be trying to cheat // and false if everything seems fine
function ac_check($row) { global $session; if (isset($row['acctid'])) { if (!isset($row['uniqueid'])) { $sql = "SELECT uniqueid FROM accounts WHERE acctid = '".$row['acctid']."'"; $result = db_query($sql); if (db_num_rows($result)>0) { $row = db_fetch_assoc($result); } else { return false; } } if ($session['user']['uniqueid'] == $row['uniqueid']) { return true; }else{ return false; } }else { return false; } }
?>
|