For those who have chat room, you might want to add this, Because while your members are forum banned and mail banned they can still act a fool on chat.
This Is going to go Into pieces as It might not fit In one post!
First Off add the SQL
ALTER TABLE `users` ADD `chatban` int(11) NOT NULL default '2'
ALTER TABLE `users` ADD `chat_reason` varchar(255) collate latin1_general_ci NOT NULL default '',
open your staff_punit.php And find
case 'massjailip': mass_jail(); break;
Add Under
case 'chatform': chat_user_form(); break;
case 'chatsub': chat_user_submit(); break;
case 'unchatform': chatb_user_form(); break;
case 'unchatsub': unchat_user_submit(); break;
Then find
$h->endpage();
And above It add
function chat_user_form()
{
global $db,$ir,$c,$h,$userid;
print "<h3>Chat Banning User</h3>
The user will be banned from the chat room.<br />
<form action='staff_punit.php?action=chatsub' method='post'>
User: ".user_dropdown($c,'user',$_GET['ID'])."<br />
Days: <input type='text' name='days' /><br />
Reason: <input type='text' name='reason' /><br />
<input type='submit' value='Chat Ban User' /></form>";
}
function chat_user_submit()
{
global $db,$ir,$c,$h,$userid;
$_POST['reason']=$_POST['reason'];
$re=$db->query("UPDATE users SET chatban={$_POST['days']},chat_reason='{$_POST['reason']}' WHERE userid={$_POST['user']}");
event_add($_POST['user'],"You were banned from chat for {$_POST['days']} day(s) for the following reason: {$_POST['reason']}",$c);
print "User Chat Banned.";
stafflog_add("Chat Banned User ID {$_POST['user']} for {$_POST['days']} days");
}
function chatb_user_form()
{
global $db,$ir,$c,$h,$userid;
print "<h3>Un-Chat Banning User</h3>
The user will be taken out of chat ban.<br />
<form action='staff_punit.php?action=unchatsub' method='post'>
User: ".chatb_user_dropdown($c,'user')."<br />
<input type='submit' value='Un-Chat Ban User' /></form>";
}
function unchat_user_submit()
{
global $db,$ir,$c,$h,$userid;
$db->query("UPDATE users SET chatban=0 WHERE userid={$_POST['user']}");
print "User un-chat banned.";
event_add($_POST['user'], "You were unbanned from chat. You can now use it again.", $c);
stafflog_add("Un-chat banned user ID {$_POST['user']}");
}