View Full Version : Also banned usergroup in chat ?
SatNews
04-08-2005, 11:09 AM
Hi
I've installed VbChat on Vbulletin 3.07 and all seems to be ok : since the chat MUST be for internal use I've banned all usergroup except Mods/admin/supermod .
Now when a registered user try to acces Vbchat he receives the error messages but the name appears in the "User currently inside" in the forum page and also in the chat page.
Do I make some errors while installing ?
Thanks a lot
cu
Zero Tolerance
04-08-2005, 01:26 PM
Hmm, the chat doesn't recocnize the banned users when viewing who's online inside the chat, similar to vBulletin, if a banner member visits your forum, it still shows them on the users online list.
- Zero Tolerance
SatNews
04-08-2005, 01:38 PM
Hi
thanks for your answer : so when a user of a banned (not autorized is better) usergroup click on the VbChat FIRST its name is sent to the user online list and THEN he receives the error message that say that he isnt autorized ?
In my case (registered user are not autorized) if all try to access the chat I'll have a user online list of the chat as big as the one of the forum : would not be better to put the name in the list only after authentication procedure ?
Just another little thing : is it possible to have the vbchat windows automatically sized as the windows which contain it ?
cu
Zero Tolerance
04-08-2005, 01:49 PM
Nah, the query simply finds registered users that are viewing 'vBChat.php', a code could be added to disclude banned users from showing up, by altering the query.
Open vBChat.php
Find:
// Any Body Here?
$datecut = TIMENOW - $vboptions['cookietimeout'];
Above Place:
$Discard_Banned = "";
if(is_array($UserIDCheck) && $Chat_Options['d_bannedusers'] != ""){
$Discard_Banned = implode(",",$UserIDCheck);
$Discard_Banned = "and user.userid not in({$Discard_Banned})";
}
if(is_array($UsergroupCheck) && $Chat_Options['d_bannedgroups'] != ""){
if($Discard_Banned == ""){
$Discard_Banned = "and user.usergroupid not in(".implode(",",$UsergroupCheck).")";
} else {
$Discard_Banned .= "
and user.usergroupid not in(".implode(",",$UsergroupCheck).")
";
}
}
Find:
user.username, user.vbchat_pref_status,
Replace With:
user.username, user.usergroupid, user.vbchat_pref_status,
Find:
" . iif($vboptions['displayloggedin'] == 1, "ORDER BY username ASC") . "
Above Add:
{$Discard_Banned}
Save & Upload vBChat.php
I ran the query to test it out, it worked, didn't test it out on the vBChat program though, but it should work, let me know the results :)
- Zero Tolerance
SatNews
04-08-2005, 02:07 PM
Hi
I' ve modified the file as in your instruction but nothing is changed : any error but all is as before. A soon as the user receive the eror messages he's in the list (inside the chat and oin the forum)
Thanks
cu
****** ??? Script has changed .. wait for me to test :)
Zero Tolerance
04-08-2005, 02:12 PM
I updated the script (i put an edit notice in while i was doing it, maybe you didn't see it)
Undo the old edits i posted before and re-do those ones, the previous one only discarded banned members, it now includes banned usergroups :)
- Zero Tolerance
SatNews
04-08-2005, 02:22 PM
Here I am ..
With the last script the situation is as follow
1) User does not appears in online list inside the chat ..
2) User DOES appears in the online list in the page of the forum
Thanks a lot
cu
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.