vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Problem with Chat trolls (https://vborg.vbsupport.ru/showthread.php?t=242650)

Chadi 05-16-2010 05:13 PM

Problem with Chat trolls
 
There is someone continually trolling my chat room (under new accounts constantly) somehow and I don't know how he's doing this for the following reasons:

1. new registrations moderated first (he was not approved yet, but "awaiting email activation"
2. Real Chat (software) is set to usergroups 2, 6, 7, and 38 only. Awaiting email activation usergroup as you know is 4.

This is the template I'm using in various places (header, footer, arcade main page for example) that contains the entrance link. Is something wrong here?

Code:

<!-- Media Center Nav -->
<div class="mc_border_out">
  <div class="mc_border_in">

<div id="middlebar">
<a href="http://www.talkjesus.com/arcade.php"><span><img src="/images/media-menu/games.png" alt="Arcade Games" class="img-media-menu" />&nbsp;Arcade</span></a>
<a href="http://www.talkjesus.com/blogs"><span><img src="/images/media-menu/highlight.png" alt="Blogs" class="img-media-menu" />&nbsp;Blogs</span></a>
<if condition="in_array($bbuserinfo['usergroupid'], array(2,6,7,38))">
<a href="http://www.talkjesus.com/misc.php?do=page&template=Chat"><span><img src="/images/media-menu/chat.png" alt="Christian Live Chat" class="img-media-menu" />&nbsp;Live Chat</span></a><else /><a href="http://www.talkjesus.com/forum-rules-ten-commandments/53-talk-jesus-10-commandments-rule.html"><span><img src="/images/media-menu/chat.png" alt="Christian Live Chat" class="img-media-menu" />&nbsp;Live Chat: Disabled (?)</span></a></if>
<a href="http://www.talkjesus.com/album.php"><span><img src="/images/media-menu/folder.png" alt="Member Albums" class="img-media-menu" />&nbsp;Member Albums</span></a>
<a href="http://www.talkjesus.com/gallery/index.php"><span><img src="/images/media-menu/image.png" alt="Photo Gallery" class="img-media-menu" />&nbsp;Photo Gallery</span></a>
<a href="javascript:openRadioAndTV()"><span><img src="/images/media-menu/multimedia.png" alt="Radio Streaming" class="img-media-menu" />&nbsp;Radio</span></a>
</div>
 
  </div>
</div>
<!-- /Media Center Nav -->

<br />

Info:
VB 3.8x
RealChat
Usergroups 2,6,7,38 only allowed.

Eric 05-17-2010 02:56 AM

If they know the link to the chat, just using a template conditional to hide it won't work. You'll need to have the 'misc.php?do=page&template=Chat' do a check on usergroup. For example:

PHP Code:

if ($_REQUEST['do'] == 'page' AND $_REQUEST['template'] == 'Chat')
{
        if (!
is_member_of($vbulletin->userinfo2,6,7,38))
        {
                
print_no_permission();
        }



Chadi 05-17-2010 10:19 AM

Thanks, but confused here.

Where is the full link for chat in your code, and closing if statement?

Chadi 05-18-2010 03:01 PM

Would appreciate help here

Chadi 09-25-2010 08:39 AM

I would appreciate help on this

kh99 09-25-2010 09:54 AM

The code above needs to be in a plugin. In the admin control panel under "Plugins & Products" choose "Add New Plugin". I think for "Hook Location", "misc_start" might work. Enter a title like "Chat Permissions" or something, and paste the above code in the "Plugin PHP Code" field. Choose "Yes" next to "Plugin is Active" and then press "Save".


All times are GMT. The time now is 03:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01854 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete