vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Hellban 0.1 (https://vborg.vbsupport.ru/showthread.php?t=35308)

intellected 02-21-2002 10:00 PM

UPDATED!!! AGAIN!

This is a more effective solution than the standard "ban", and is meant to be used for very annoying troublemakers that keeps re-registering once banned. Anyway - once a user is placed under the "Hellban", the following happens:

1. Every 3:d time the user tries to load a page, he is greeted with a fake "500 Internal Server Error" message.

2. Nobody but moderators and the user himself can see his posts. He is, essentially, under a site-wide ignore.

This may not be a 100% fail-safe solution, but a lot of the morons will hopefully get tired and go away.

Here is how it's done:

1. Run the following query on your database:

INSERT INTO usergroup VALUES("666","Hellban","","0","1","1","1","1","0", "1","0","0","0","1","1","1","1","0","0","1","1","1 ","0","0","1","0","0","0","0","0","0","0","0","1") ;
ALTER TABLE post ADD hellban INT UNSIGNED;
ALTER TABLE thread ADD hellban INT UNSIGNED;

2. Add this at the bottom of you global.php
PHP Code:

if ($bbuserinfo[usergroupid] == 666) {
  
  
$randnum mt_rand(1,3);
  if (
$randnum == 1) {
    
header("HTTP/1.0 500 Internal Server Error");
    exit;
  }   



3. Find this in newreply.php:
PHP Code:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes(htmlspecialchars($postusername))."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')"); 

REPLACE it with this:

PHP Code:

if ($bbuserinfo[usergroup] == 666) {
  
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,hellban) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes(htmlspecialchars($postusername))."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible','$bbuserinfo[userid]')");
} else {
  
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes(htmlspecialchars($postusername))."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");


4. find this in newthread.php

PHP Code:

$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')"); 

PHP Code:

if ($bbuserinfo[usergroup] == 666) {
  
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach,hellban) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount','$bbuserinfo[userid]')");
} else {
  
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')"); 


in that file, also find this:

PHP Code:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','1')"); 

PHP Code:

if ($bbuserinfo[usergroup] == 666) {
  
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,hellban) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','1','$bbuserinfo[userid]')");
} else {
  
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','1')");


After that, find this:

PHP Code:

if ($visible==1) {
        
$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1,lastpost='".time()."',lastposter='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");


and replace with this:

PHP Code:

if ($visible==&& $bbuserinfo[usergroup] != 666) {
  
$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1,lastpost='".time()."',lastposter='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");


I showthread.php, find this:
PHP Code:

  $getpostids=$DB_site->query(
    SELECT post.postid FROM post
    WHERE post.threadid='
$threadid' AND post.visible=1 
    ORDER BY dateline 
$postorder LIMIT ".($limitlower-1).",$perpage 
  "
); 

Replace with this:

PHP Code:

if ($bbuserinfo[usergroupid] == 666 || ismoderator($forumid)) {
  
  
$getpostids=$DB_site->query(
    SELECT post.postid FROM post
    WHERE post.threadid='
$threadid' AND post.visible=1 AND post.hellban = '$bbuserinfo[userid]'
    ORDER BY dateline 
$postorder LIMIT ".($limitlower-1).",$perpage 
  "
);  
  
} else {

$getpostids=$DB_site->query(
    SELECT post.postid FROM post
    WHERE post.threadid='
$threadid' AND post.visible=1 AND post.hellban = NULL
    ORDER BY dateline 
$postorder LIMIT ".($limitlower-1).",$perpage 
"
);



in forumdisplay.php, find this:

PHP Code:

    $getthreadids=$DB_site->query("
    SELECT
    "
.iif($sortfield=="voteavg",$votequery,"")."
        thread.threadid
    FROM thread
    WHERE thread.forumid = 
$foruminfo[forumid]
        AND thread.sticky=0
        AND thread.visible=1
    
$datecut
    
$limitothers
      ORDER BY sticky DESC, 
$sortfield $sqlsortorder
      LIMIT "
.($sel_limitlower-1).",$perpage"); 

Replace that with this:

PHP Code:

if ($bbuserinfo[usergroup] == 666) {
  
$getthreadids=$DB_site->query("
    SELECT
    "
.iif($sortfield=="voteavg",$votequery,"")."
        thread.threadid
    FROM thread
    WHERE thread.forumid = 
$foruminfo[forumid]
        AND thread.sticky=0
        AND thread.visible=1
        AND thread.hellban = NULL
        AND thread.hellban = '
$bbuserinfo[userid]'
    
$datecut
    
$limitothers
      ORDER BY sticky DESC, 
$sortfield $sqlsortorder
      LIMIT "
.($sel_limitlower-1).",$perpage");
      
} else {
  
    
$getthreadids=$DB_site->query("
    SELECT
    "
.iif($sortfield=="voteavg",$votequery,"")."
        thread.threadid
    FROM thread
    WHERE thread.forumid = 
$foruminfo[forumid]
        AND thread.sticky=0
        AND thread.visible=1
    
$datecut
    
$limitothers
      ORDER BY sticky DESC, 
$sortfield $sqlsortorder
      LIMIT "
.($sel_limitlower-1).",$perpage");
  


Now, whenever you want to get rid of a user, simply set him or her to usergroup Hellban.

Sharp 02-22-2002 01:42 AM

Interesting.... Might check it out sometime....

BigJohnson 02-22-2002 01:53 AM

nice thanx

SaintDog 02-22-2002 03:31 AM

I may install this for those users that keep registering multiple names even though they were asked nicely not to register more than once :D - That will teach them to listen ;)

SaintDog

Arathorn 02-22-2002 05:05 AM

Just to be clear, this hack basically puts a certain username in torture mode. Instead of banning him, you let him in and toy with him. But what's to prevent the user from re-registering yet again and escaping the hellban? Or does this hack somehow detect that?

intellected 02-22-2002 11:54 AM

Quote:

Originally posted by Arathorn
Just to be clear, this hack basically puts a certain username in torture mode. Instead of banning him, you let him in and toy with him. But what's to prevent the user from re-registering yet again and escaping the hellban? Or does this hack somehow detect that?
He hack is meant for the idiots that just keep re-registering even though they are banned over and over again due to their idiotic behavior. Toying or torture has nothing to do with it.

There is nothing to prevent the user from re-registering, and I don't think there ever will be, as the use can just delete the vbulletin cookie, EXCEPT for the fact that he might not be aware of hellban, unlike the standard ban.

This hack is meant to be silent (i.e. the banned used is unaware of it), and only meant for extreme troublemakers. It's meant to make terrorizing the forums a much less pleasureable experience (i.e. annoying error messages and no responses to his flamebaits). Some may discover that they are being fooled, but some (hopefully) will simply be bored and walk away.

Overgrow 02-24-2002 07:03 AM

I like this, except for the JOIN on the table that it adds with every showthread. Maybe a more efficient solution would be to modify newreply and newthread so that whenever a 666-user posts, it is automatically made visible=0? Or would that put it in the moderation queue...

Have you run this on a sizeable board and is there much of a hit with the join?

intellected 02-24-2002 10:32 AM

Quote:

Originally posted by Overgrow
I like this, except for the JOIN on the table that it adds with every showthread. Maybe a more efficient solution would be to modify newreply and newthread so that whenever a 666-user posts, it is automatically made visible=0? Or would that put it in the moderation queue...

Have you run this on a sizeable board and is there much of a hit with the join?

I don't know much about database performance - are joins that heavy? You solution would be better performance-wise, but it would take away the advantage of the user seeing his own posts. If they were invisible, he/she would probably get suspicious.

The solution would be to add a "hellban" column to the post table... I'll see what I can do.

Admin 02-24-2002 10:41 AM

Joins are heavy on the database when they are done on large tables... post and user are 2 of the biggest tables in vB, so it should make things slower.

Adding a hellban flag to the post table would be ok, but bear in mind that even if you take a user out of that usergroup his older posts will still remain hidden.

intellected 02-24-2002 10:49 AM

Quote:

Originally posted by FireFly
Joins are heavy on the database when they are done on large tables... post and user are 2 of the biggest tables in vB, so it should make things slower.

Adding a hellban flag to the post table would be ok, but bear in mind that even if you take a user out of that usergroup his older posts will still remain hidden.


Oh yes - I guess that makes sense. And so I have learned another thing! :pleased:

As for the remain-hidden issue, the only solution I can think of is to add a little admin interface for it, but it seems overkill, as this is pretty much a last-resort-ban.

intellected 02-24-2002 11:20 AM

Updated with modifications!

[edit] Also, dear admins of this board - you might like to modify the PHP-code template so that the tables are left-aligned and dont look like **** ;)

Rick 02-24-2002 09:46 PM

I got this error when I tried to run the query.

SQL-query:

INSERT INTO usergroup VALUES(\"666\",\"Hellban\",\"\",\"0\",\"1\",\"1\", \"1\",\"1\",\"0\",\"1\",\"0\", \"0\",\"0\",\"1\",\"1\",\"1\",\"1\",\"0\",\"0\",\" 1\",\"1\",\"1\",\"0\",\"0\",\" 1\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\ ",\"1\");
ALTER TABLE post ADD hellban INT UNSIGNED;
ALTER TABLE thread ADD hellban INT UNSIGNED;

MySQL said: Column count doesn't match value count at row 1

supreemball 02-24-2002 11:41 PM

me too, rick.

intellected 02-25-2002 01:19 AM

Quote:

Originally posted by supreemball
me too, rick.
How very wierd - the query is the exact same that I used when inserting it. Anyway, it's not really complicated to circumvent:

Just create a new usergroup, and then go into phpmyadmin and change the groupid to 666.

hagi 02-25-2002 02:45 AM

Quote:

Originally posted by intellected

How very wierd - the query is the exact same that I used when inserting it. Anyway, it's not really complicated to circumvent:

Just create a new usergroup, and then go into phpmyadmin and change the groupid to 666.

i dont have phpmyadmin. i actually didnt know how to run query's until i got that hack for the vbb admin cp. is their any other query i can run to make it work, cause i got the same problems as others and clueless on this. btw, sounds like a good hack.

intellected 02-25-2002 02:56 AM

Quote:

Originally posted by hagi


i dont have phpmyadmin. i actually didnt know how to run query's until i got that hack for the vbb admin cp. is their any other query i can run to make it work, cause i got the same problems as others and clueless on this. btw, sounds like a good hack.

Seriously man, this is indeed the EXACT query I use:

Code:

INSERT INTO usergroup VALUES("666","Ultimate ban","","0","1","1","1","1","0","1","0","0","0","1","1","1","1","0","0","1","1","1","0","0","1","0","0","0","0","0","0","0","0","1");
And it works flawlessly on vB 2.2.2. I have no idea why it doesn't work for you. Anyone got any ideas?

hagi 02-25-2002 03:34 AM

its funny, mine just worked now without me doing anything. well, thanks for the help

Rick 02-25-2002 09:14 PM

Still no good for me :-(

hagi 02-26-2002 01:05 AM

i got the query to work, but the hack itself wont work for some reason

Neo 03-02-2002 07:15 AM

props to you. nice hack.

Overgrow 03-02-2002 11:58 AM

I did a quick & dirty hack that has much of the same effect but without the query JOIN -- (removes a person's posts but lets them see 'em normally so they don't know what happened)...

https://vborg.vbsupport.ru/showthrea...threadid=35589

Freddie Bingham 03-02-2002 03:59 PM

JOINS are only a problem if the field(s) you are joining are not-indexed.

Overgrow 03-02-2002 04:08 PM

Freddie, you so smart... and it appears usergroupid is already indexed. So his original showthread join with the user would not have been a problem eh? Sorry intellected! I see you already changed it to use a new field, post.hellban. If the original way really didn't add much overhead, it was probably the more elegant solution rather than adding a new field to post.

Freddie Bingham 03-02-2002 10:30 PM

I don't know, I didn't look at his code so I have no comment on it's effectiveness at utilizing the database.

Jawelin 04-19-2002 10:42 AM

I think the usergroup is already read at showpost / newreply / newthread time.
So there is that info at postbit level, and we can use it without adding the hellban field to post & thread tables.

What do you think about ?
Thnx

FFMania 05-06-2002 10:28 AM

Same thing.....same error....can't get the query to work....help plz?

GenSec 05-13-2002 02:10 PM

I like hellban idea, but there is another way.
If you created 666 usergroup you find in admin/ functions.php
PHP Code:

    if (!$ignore[$post[userid]]) {
        eval(
"\$retval = \"".gettemplate("postbit")."\";");
    } else {
        eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } 

add below
PHP Code:

    if ($post[usergroupid]==666 AND $bbuserinfo[usergroupid]!=666) {
           eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } 

and all your hellbanned user are on common ignore list.

Or change postbit_ignore template for more suited.

Brad 05-31-2002 03:20 AM

Quote:

Database error in vBulletin Control Panel 2.2.5:

Invalid SQL: INSERT INTO usergroup VALUES("666","Ultimate ban","","0","1","1","1","1","0","1","0","0","0","1 ","1","1","1","0","0","1","1","1","0","0","1","0", "0","0","0","0","0","0","0","1");

mysql error: You have an error in your SQL syntax near ';
' at line 1

mysql error number: 1064

Date: Friday 31st of May 2002 05:20:26 AM
Script: http://www.kousetsu.net/forums/forums/admin/query.php
Referer: http://www.kousetsu.net/forums/admin/query.php?s=<?php echo 6ed374efbed9b32d097264f97d3a4586; ?>
:(

Brad 05-31-2002 02:43 PM

n/m, got it to work in phpmyadmin

Brad 06-01-2002 07:00 AM

i found a better method if you got admins out there that like members you ban. simalar to the one above but im using it and it works
in functions.php


find
PHP Code:

if (!$ignore[$post[userid]]) {
        eval(
"\$retval = \"".gettemplate("postbit")."\";");
    } else {
        eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } 

under add
PHP Code:

if ($post[userid]==*users id here* AND $bbuserinfo[userid]!=*users ID here*) {
           eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
      } 

replace *user id here* with their user id

then deleate everything from postbit_ignore

chris frolic 06-13-2002 09:29 PM

I loved the 505 error bit, so I only took that bit from this hack, and removed the random number generator so that it happens everytime, and the person is effectively locked out of the board for good. (unless they clear their cookies - but most probably won't even know whats going on).

Demascus 06-20-2002 03:59 PM

When i tested this on my forum on my machine, after editing the showthread.php i couldnt see the thread at all. every thread was blacked out. i dunno what the problem is

Link14716 06-28-2002 01:45 AM

Ok, I tried to install this (on 2.2.6), but at the showthread.php part, after I saved the file, no posts where visible....

Link14716 07-02-2002 04:30 PM

BUMP

DarkReaper 10-29-2002 12:12 AM

Major bump

rishel 11-03-2002 12:14 PM

Ultra bump

Taco John 12-25-2002 05:07 AM

Is this thing going to make it to a final? Sounds like an interesting hack.

remal 04-29-2003 05:22 PM

hi

i have this proplem:

Parse error: parse error, unexpected ')' in /home/forumcom/public_html/newthread.php on line 228

here is line 228:
PHP Code:

  $DB_site->query("INSERT INTO thread  (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach,hellban) VALUES (NULL,'".$subject))."','".time()."','$forumid','1','0','".$postusername)."','$bbuserinfo[userid]','".$postusername)."','".time()."','$iconid','$visible','$attachcount','$bbuserinfo[userid]')"); 


lupinko 06-22-2006 04:09 PM

Can this hack be used for vB3.0.3?

peterska2 06-22-2006 08:28 PM

Search for the miserable users modification which is available for version 3.0.x and 3.5.x which does the same thing.


All times are GMT. The time now is 04:44 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.01632 seconds
  • Memory Usage 1,926KB
  • 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
  • (18)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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