Exemplo n.º 1
0
 if ($_POST['umessage'] == 'KICK' || $_POST['umessage'] == 'BAN') {
     if (getAdmin($_SESSION['username']) == '1' || getModerator($_SESSION['username']) == '1') {
         // prevents admins from kicking each other
         if (getAdmin($_POST['toname']) != '1') {
             // ban/kick user
             banKickUser($_POST['umessage'], $_POST['toname']);
         }
     } else {
         die("incorrect permissions");
     }
     // check user is room owner
     if ($_POST['umessage'] == 'KICK' && getRoomOwner($_SESSION['room'])) {
         // prevents admins from kicking each other
         if (getAdmin($_POST['toname']) != '1') {
             // ban/kick user
             banKickUser($_POST['umessage'], $_POST['toname']);
         }
     }
 }
 if ($_POST['umessage'] == 'SILENCE' && (getAdmin($_SESSION['username']) != '1' && getRoomOwner($_SESSION['username']) != '1' && getModerator($_SESSION['username']) != '1')) {
     die("incorrect permissions");
 }
 // prevent admins from being silenced or kicked
 if (($_POST['umessage'] == 'SILENCE' || $_POST['umessage'] == 'KICK') && getAdmin($_POST['toname'])) {
     die("incorrect permissions");
 }
 // if public webcam view, add stream id
 if ($_POST['umessage'] == 'WEBCAM_ACCEPT') {
     $_POST['umessage'] = 'WEBCAM_ACCEPT||' . $_SESSION['myStreamID'];
 }
 // send message
Exemplo n.º 2
0
* reset eCredit sessions
*
*/
if ($_SESSION['eCreditsInit']) {
    unset($_SESSION['eCreditsInit']);
    unset($_SESSION['eCreditsAwardTo']);
    unset($_SESSION['eCredits_start']);
}
/*
* logout user
*
*/
if (isset($_REQUEST['logout'])) {
    logoutUser($_SESSION['username'], $_SESSION['room']);
    if ($_REQUEST['logout'] == 'kick') {
        banKickUser('KICK', $_SESSION['username']);
    }
    unset($_SESSION['username']);
    unset($_SESSION['userid']);
    unset($_SESSION['room']);
    unset($_SESSION['guest']);
    $loginError = C_LANG5;
    if ($CONFIG['CMS']) {
        die($loginError);
    } else {
        include "templates/" . $CONFIG['template'] . "/login.php";
        die;
    }
}
/*
* check room is set