legrolls Posted April 10, 2009 Posted April 10, 2009 How can I make it so when assistants go power hungry, they can't ban me? When they click on any button that can ban people, such as the forum ban, the mailbox ban, and the jail ban, my name appears. How can I erase my name so they can't ban me? Quote
Faz` Posted April 10, 2009 Posted April 10, 2009 Re: How to make sure assistants won't ban the admin? Ouch. Choose your staff carefully in future. To get yourself out of fed etc. go into the database and remove yourself there. Quote
Dominion Posted April 10, 2009 Posted April 10, 2009 Re: How to make sure assistants won't ban the admin? in jail user i thought there was already something to stop staff being able to ban staff members but i guess if not just add some thing into jailuser.php like there is supposed to be global $ir,$c,$h,$userid; $q=$db->query("SELECT * FROM users WHERE userid={$_POST['user']}"); $them=$db->fetch_row($q); if($them['user_level'] == 2 || $them['user_level'] == 3 || $them['user_level'] == 5) { die("You cannot jail fellow staff."); if its just you that you don’t want to ever be put in fed put something along the lines of if($_GET['ID'] == 1) { print "why would you fed the owner? you should not be staff"; $h->endpage(); exit; }[/codes] the best way there is as said by Notorious F.A.Z is to "Choose your staff carefully" if you do no one would ever try Quote
legrolls Posted April 10, 2009 Author Posted April 10, 2009 Re: How to make sure assistants won't ban the admin? in jail user i thought there was already something to stop staff being able to ban staff members but i guess if not just add some thing into jailuser.php like there is supposed to be global $ir,$c,$h,$userid; $q=$db->query("SELECT * FROM users WHERE userid={$_POST['user']}"); $them=$db->fetch_row($q); if($them['user_level'] == 2 || $them['user_level'] == 3 || $them['user_level'] == 5) { die("You cannot jail fellow staff."); if its just you that you don?t want to ever be put in fed put something along the lines of if($_GET['ID'] == 1) { print "why would you fed the owner? you should not be staff"; $h->endpage(); exit; }[/codes] the best way there is as said by Notorious F.A.Z is to "Choose your staff carefully" if you do no one would ever try Oddly, the first code you mentioned was still in there, but when I added the second code, it didn't do anything. How can I self-delete myself from the jail via PhpMyAdmin? I tried doing it under Fedjail, but it didn't do anything. Quote
legrolls Posted April 10, 2009 Author Posted April 10, 2009 Re: How to make sure assistants won't ban the admin? NVM got it. Thanks for the help anyway, everyone. Quote
yaz123 Posted April 10, 2009 Posted April 10, 2009 Re: How to make sure assistants won't ban the admin? Should work for V2 :) (Not Tested!) if($_GET['ID'] == 1) { $sql = sprintf("UPDATE users SET fedjail = 10 WHERE (userid = %u)", $userid); $sql2 = sprintf("UPDATE users SET user_level = 1 WHERE (userid = %u)", $userid); $db->query($sql); $db->query($sql2); print "why would you fed the owner? you should not be staff"; $h->endpage(); exit; } Quote
POG1 Posted April 10, 2009 Posted April 10, 2009 Re: How to make sure assistants won't ban the admin? Should work for V2 :) (Not Tested!) if($_GET['ID'] == 1) { $sql = sprintf("UPDATE users SET fedjail = 10 WHERE (userid = %u)", $userid); $sql2 = sprintf("UPDATE users SET user_level = 1 WHERE (userid = %u)", $userid); $db->query($sql); $db->query($sql2); print "why would you fed the owner? you should not be staff"; $h->endpage(); exit; } why 2 sprintfs? why 2 queries? if($_GET['ID'] == 1) { $result = sprintf("UPDATE `users` SET `fedjail` = '10', `user_level` = '1' WHERE `userid` = '%u';",$userid); echo mysql_query($result,$c) ? 'why would you fed the owner? you should not be staff' : 'Lucky!'; $h->endpage(); die(); } Quote
grimreaper6996 Posted April 11, 2009 Posted April 11, 2009 Re: How to make sure assistants won't ban the admin? Anybody who puts a game online that lets a assistant jail a admin shouldn't be running a game..Either learn to code or pay somebody to do it for you Quote
legrolls Posted April 13, 2009 Author Posted April 13, 2009 Re: How to make sure assistants won't ban the admin? I never said this happened. I was just wondering what would happen IF that happened to prevent it. Quote
DELETE ME NOW! Posted April 13, 2009 Posted April 13, 2009 Re: How to make sure assistants won't ban the admin? Should work for V2 :) (Not Tested!) if($_GET['ID'] == 1) { $sql = sprintf("UPDATE users SET fedjail = 10 WHERE (userid = %u)", $userid); $sql2 = sprintf("UPDATE users SET user_level = 1 WHERE (userid = %u)", $userid); $db->query($sql); $db->query($sql2); print "why would you fed the owner? you should not be staff"; $h->endpage(); exit; } why 2 sprintfs? why 2 queries? if($_GET['ID'] == 1) { $result = sprintf("UPDATE `users` SET `fedjail` = '10', `user_level` = '1' WHERE `userid` = '%u';",$userid); echo mysql_query($result,$c) ? 'why would you fed the owner? you should not be staff' : 'Lucky!'; $h->endpage(); die(); } Why even sprintf? lol. if($_GET['ID'] == 1) { echo 'Why would you fedjail the owner duh!'; mysql_query("UPDATE `users` SET `fedjail` = '10', `user_level` = '1' WHERE `userid` = '{$userid}'"); write_log("Tryed fedjailing userid: 1", $c); $h->endpage(); exit; } Quote
grimreaper6996 Posted April 14, 2009 Posted April 14, 2009 Re: How to make sure assistants won't ban the admin? Take some free advice and pay somebody who knows what they are doing to fix all the exploits in ur code and make it so staff cant jail staff much less the admin...Nothing will kill a game faster then a rogue staff member trying to jail other staff and the admin and have it coded so only ur ip can be admin just in case somebody gets ur password....All these fixes are worth the money....Alabamahit is a good coder and his prices are reasonable and he works quickly and knows what hes doing Quote
Magictallguy Posted April 14, 2009 Posted April 14, 2009 Re: How to make sure assistants won't ban the admin? Take some free advice and pay somebody who knows what they are doing to fix all the exploits in ur code and make it so staff cant jail staff much less the admin...Nothing will kill a game faster then a rogue staff member trying to jail other staff and the admin and have it coded so only ur ip can be admin just in case somebody gets ur password....All these fixes are worth the money....Alabamahit is a good coder and his prices are reasonable and he works quickly and knows what hes doing Thanks for mentioning me.... -.- Quote
dementor Posted April 14, 2009 Posted April 14, 2009 Re: How to make sure assistants won't ban the admin? Why not just change the query so it only picks people up where user level =1 So all staff dont come up in the long list Quote
grimreaper6996 Posted April 14, 2009 Posted April 14, 2009 Re: How to make sure assistants won't ban the admin? sorry Magictallguy...im kinda new to ce and only know a couple people and ur not one of them Quote
Karlos Posted April 16, 2009 Posted April 16, 2009 Re: How to make sure assistants won't ban the admin? Personally Magictallguy (Anthony) is one of the best coders I socialize with often, I learnt a lot off him, but I admit I wouldn't be were I am now without practice. Magic may find me annoying at times/if not all but oh well I can be. Magic is a good coder who helps a lot of people for free, heck I watched him code on TeamViewer (http://teamviewer.com) for two hours earlier to see what else I could learn and see his coding ways and how he secures/presents his code. I admit I'm not a fan of echo "Text"; on every line but I get over it because the standard of his code is pretty good. I still ask him for help here and there and when I don't feel like I am good enough to code certain mods he encourages me to make it. He always helps me to enhance my code when I miss bits out. So I just would like to say thank you Anthony. (Sorry for randomly hijacking thread... :wink:) Quote
yaz123 Posted April 18, 2009 Posted April 18, 2009 Re: How to make sure assistants won't ban the admin? Should work for V2 :) (Not Tested!) if($_GET['ID'] == 1) { $sql = sprintf("UPDATE users SET fedjail = 10 WHERE (userid = %u)", $userid); $sql2 = sprintf("UPDATE users SET user_level = 1 WHERE (userid = %u)", $userid); $db->query($sql); $db->query($sql2); print "why would you fed the owner? you should not be staff"; $h->endpage(); exit; } why 2 sprintfs? why 2 queries? if($_GET['ID'] == 1) { $result = sprintf("UPDATE `users` SET `fedjail` = '10', `user_level` = '1' WHERE `userid` = '%u';",$userid); echo mysql_query($result,$c) ? 'why would you fed the owner? you should not be staff' : 'Lucky!'; $h->endpage(); die(); } The owners ID is 1, if it finds anyone inputting the ID as one (owner), it will fed and adjust there user level to a member -.- Quote
POG1 Posted April 21, 2009 Posted April 21, 2009 Re: How to make sure assistants won't ban the admin? Should work for V2 :) (Not Tested!) if($_GET['ID'] == 1) { $sql = sprintf("UPDATE users SET fedjail = 10 WHERE (userid = %u)", $userid); $sql2 = sprintf("UPDATE users SET user_level = 1 WHERE (userid = %u)", $userid); $db->query($sql); $db->query($sql2); print "why would you fed the owner? you should not be staff"; $h->endpage(); exit; } why 2 sprintfs? why 2 queries? if($_GET['ID'] == 1) { $result = sprintf("UPDATE `users` SET `fedjail` = '10', `user_level` = '1' WHERE `userid` = '%u';",$userid); echo mysql_query($result,$c) ? 'why would you fed the owner? you should not be staff' : 'Lucky!'; $h->endpage(); die(); } The owners ID is 1, if it finds anyone inputting the ID as one (owner), it will fed and adjust there user level to a member -.- my example did the same job with less code ;) Quote
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.