PDA

View Full Version : Removing unmoderated users (trolls) from Who's Online


ncaross
11-05-2012, 11:02 PM
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:

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

ncaross
11-06-2012, 05:20 AM
Are you talking about the "Who's Online" page (online.php)? Create a plugin using hook online_query and this 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:
$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:
if (is_member_of($loggedin, 3, 4))
{
$loggedin['lastactivity'] = 0;
}