PDA

View Full Version : Banning users from non-vb pages


hurrican
02-16-2005, 12:34 AM
Trying to accomplish where I can ban users by admin/user.php .. I have added "can access chat room" to that, which shows up, added that information to my database.. however, I am having trouble trying to get it expressed in the chat.php file.. My current chat file checks to see if the user can send pm's.. if yes, they can access chat, if no, they can't.. however, i want to make a 'canaccesschatroom' instead..

anyone tell me how I can modify this to make this work properly?


<?php

$service = "sigmachat"; # Options are: "ice" or "sigmachat"

error_reporting(7);

$templatesused='chat,chatbit,chatredirect';

// ## Changes Directory so it can accesss vbulletin ##
chdir("/home/public_html/vb/");
// ## Grabs global.php ##
require("./global.php");

$permissions=getpermissions($forumid);
if (!$permissions[canusepm]) {
show_nopermission();
}

if ($bbuserinfo['userid']!=0) {

if ((!isset($setwidth) or $setwidth=="") or (!isset($setheight) or $setheight=="")) {
eval("dooutput(\"".gettemplate('chatredirect')."\");");
}
.................

hurrican
02-18-2005, 02:02 AM
Basically, what I want to do since I must have not been clear, is create an option in the "USER" table so that I can choose Yes/No for "Can This User Access Chat Room" 1 = Yes 0 = No. The current way you see my php file is to check to see if the EU is in a usergroup that allows PM's to be used. I do not want to auth this off of the "Usergroup" this time, rather, look in user table to see if the specific user has access to the chat room. Anyone?

Marco van Herwaarden
02-18-2005, 03:34 AM
What Chat hack are you talking about?

Already tried asking in the thread for that hack?

hurrican
02-18-2005, 02:04 PM
Marco,
This is the vB2.x Sigmachat file. Trying to add permissions so that my moderators can ban using no_permission template if they change the "Can Access Chat Room" to 0/No. Have not asked in the original hack file since it's an addon to that hack?

hurrican
05-22-2005, 01:21 PM
Any additional insight on this? I want to be able to choose under the "Options" tab to "Allow User to access Chat" YES/NO. I know how to do it by changing the users UserGroup, but I have many different usergroups and don't want to have to move the user from their respective groups..