vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Removing unmoderated users (trolls) from Who's Online (https://vborg.vbsupport.ru/showthread.php?t=290202)

ncaross 11-05-2012 11:02 PM

Removing unmoderated users (trolls) from Who's Online
 
vb.com has given up on me and pointed here.

Hi,

This follows on from this thread about a troll who was reporting posts relentlessly.
https://www.vbulletin.com/forum/show...44#post2332244

However, his other hobby is registering obscene usernames just so that the appear in the Who's Online section. He can do this despite being unregistered as I now have full security on new signups with people having to wait for confirmation emails from me.

He shouldn't be able to appear in Who's Online as an unmoderated user but he does.

Can anyone provide the code to stop unregistered/unmoderated users from appearing in Who's Online, please?

I don't want to delete the whole section - I already did that for 'Welcome to our newest member'.

FYI he does this several times a day and has done for several months.

Banning usernames and IP addresses doesn't work as he uses new ones every time several times a day.

Thanks

Nick

ozzy47 11-06-2012 12:50 AM

Posted in the wrong place. Reported

Paul M 11-06-2012 12:57 AM

Moved.

ozzy47 11-06-2012 01:18 AM

Thanks Paul. :D

kh99 11-06-2012 01:37 AM

Are you talking about the "Who's Online" page (online.php)? Create a plugin using hook online_query and this code:

Code:

$hook_query_where .= " AND usergroupid NOT IN (3, 4) ";

ncaross 11-06-2012 05:20 AM

Quote:

Originally Posted by kh99 (Post 2378749)
Are you talking about the "Who's Online" page (online.php)? Create a plugin using hook online_query and this code:

Code:

$hook_query_where .= " AND usergroupid NOT IN (3, 4) ";

It's just for the main forum homepage with the list of Who's online.

kh99 11-06-2012 01:04 PM

OK, try these two plugins:

hook location forumhome_whovisited:
Code:

$newarray = array();
$count = 0;
foreach ($wgo_members_list AS &$member)
{
  if (!is_member_of($member, 3, 4))
  {
      $count++;
      $newarray[$count] = &$member;
      $newarray[$count]['comma'] = $vbphrase['comma_space'];
  }
}
if ($count)
{
    $newarray[$count]['comma'] = '';
}
$wgo_members_list = &$newarray;



hook location forumhome_loggedinuser:
Code:

if (is_member_of($loggedin, 3, 4))
{
  $loggedin['lastactivity'] = 0;
}



All times are GMT. The time now is 08:15 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.01109 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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