Galahad Posted March 21, 2011 Share Posted March 21, 2011 This is a simple modification to the register that inputs the users ip in the database upon registration. This is very useful if you want to stop cheaters who try to multi ip. Put this query in phpmyadmin - ALTER TABLE players ADD regip varchar(16) NOT NULL Now open up the register module and find this - $insert['password'] = sha1($insert['secret_key'] . $_POST['password'] . SECRET_KEY); Add below - $insert['regip'] = $_SERVER['REMOTE_ADDR']; and your done! I may make a module soon to find out all the players with the same ip. You could also add to viewplayer.tpl (if you have the module) {if $player->rank == 10} [b]IP:[/b]: {$player->regip} {/if} Quote Link to comment Share on other sites More sharing options...
Paddy Posted March 22, 2011 Share Posted March 22, 2011 Thanks 21Lockdown for the add-on's, keep it up mate you are doing a very good job :thumbup: Quote Link to comment Share on other sites More sharing options...
Equinox Posted March 22, 2011 Share Posted March 22, 2011 You should look into INET_ATON() and INET_NTOA() Quote Link to comment Share on other sites More sharing options...
Galahad Posted March 25, 2011 Author Share Posted March 25, 2011 Update - Add last login IP address /modules/login.index.php Find - $query = $this->db->execute('UPDATE `<ezrpg>players` SET `last_login`=? WHERE `id`=?', array(time(), $player->id)); Add underneath - $query = $this->db->execute('UPDATE `<ezrpg>players` SET `lastip`=? WHERE `id`=?', array($_SERVER['REMOTE_ADDR'], $player->id)); And run this query - ALTER TABLE players ADD lastip varchar(16) NOT NULL Next IP module will be logs for my send gold module. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.