Version: 1.00, by Hotte
Developer Last Online: Jan 2006
Version: 2.2.x
Rating:
Released: 06-06-2002
Last Update: Never
Installs: 64
No support by the author.
Hi
I´ve wrote a little hack upon request of my "Main"-Moderators.
This hack allows them to temporary ban a given user per Userid. Simply userid, reason and how many hours. The banned user will see a modified no-permission screen when he tries to login. The User can automaticly access the board again, when the entered time is over.
For the other hackers: Feel free to modify the hack and distribute a "better" version of this if you want.
Sry for my bad english.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
What about the ismod part in that same line? I just want to make it so the admin and the supermod and whichever userid I want to enter can use it. That code they gave me in the earlier post doesn't work.
Quote:
Originally posted by Smoothie In the banuser.php file, I think its around line 10, where it says userid 1. If thats your userid, that no one else will be able to run the script.
It would be great if the person who created this hack could lend some assistance. I would like for my mods to be able to temp ban without the risk of one of them banning me.
Originally posted by Smoothie This hack I just learned can be quite harmful. What stops a mod, super mod, from banning an admin?
Nothing. But what stops a mod, super mod or admin from un-banning himself? The temp-ban doesn?t work on files in the mod oder adminfolder, so they are still able to access the banuser.php to unban.
Originally posted by Smoothie It would be great if the person who created this hack could lend some assistance. I would like for my mods to be able to temp ban without the risk of one of them banning me.
Not tested but it should work:
Find in banuser.php:
PHP Code:
if ($action=="admininsert") {
Add under it:
PHP Code:
$noadmin=$DB_site->query_first("SELECT * FROM user WHERE userid=$userid");
if ($noadmin[usergroupid]=="6") {
echo "Oops, you try to ban an admin wich is not allowed!";
echo "<br>Try again by clicking <a href="banuser.php?action=adminadd" target="_blank"><u>here</u></a>.";
cpfooter();
exit();
}
Can it also be set up to not allow the super moderator or fellow moderators to be banned by one another but the Admin can still ban whomever he/she wants?
And how about having it send an e-mail notifiation to the Admin when someone attempts to ban the Admin, Supermod or Moerators (unless the Admin themselves did it), can that be done too?
(Wait a minute! What am i saying here, "can it be done"? This is Lesane we're talking to. As long as he's around, OF COURSE it can be done!)
Quote:
Originally posted by Lesane
Not tested but it should work:
Find in banuser.php:
PHP Code:
if ($action=="admininsert") {
Add under it:
PHP Code:
$noadmin=$DB_site->query_first("SELECT * FROM user WHERE userid=$userid");
if ($noadmin[usergroupid]=="6") {
echo "Oops, you try to ban an admin wich is not allowed!";
echo "<br>Try again by clicking <a href="banuser.php?action=adminadd" target="_blank"><u>here</u></a>.";
cpfooter();
exit();
}