vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Need help fast: How to ban an IP except for specific members (https://vborg.vbsupport.ru/showthread.php?t=100548)

JJR512 11-10-2005 04:01 PM

Need help fast: How to ban an IP except for specific members
 
A lot of people from where I work have registered and are starting flame wars and other bullshit. On the board it looks like we all come from the same IP. I could member-ban but they'll just re-register. If I IP-ban, though, then I can't post, and neither can a few other co-workers who aren't part of the problem. I assume I'll have to modifiy some code somewhere but am looking for some quick help on what, where, and how. Thanks! :)

Marco van Herwaarden 11-10-2005 06:38 PM

No solution to this i guess. If IP-banned, you won't even get a login, so the board don't know who you are.

silly rabbit 11-10-2005 09:13 PM

Quote:

Originally Posted by JJR512
A lot of people from where I work have registered and are starting flame wars and other bullshit.

JJ, I am currently working on a custom 'work IP' permissions system based on the general IP ban but have nothing tested yet.

If ya need a 'nudge' look at Line#671 in global.php which calls the function verify_ip_ban() at line#551 in functions.php.

IPADDRESS is the system detected IP of person logging & $val is an element out of your 'banning list'. Would think it'd be a simple matter to test both IPADDRESS(your job IP) and the current forumid / user trying to log in.

Based On preferences, either return 'Ok' or let eval(standard_error . . .) do its work???

In my case if I BAN the work IP I'm looking to reassign anybody logging from a work set to a predetermined generic userid assigned a usergroup with restricted permissions.

Having done so, would I simply redirect back to 'index.php'??

Rabbit

Paul M 11-10-2005 09:17 PM

Quote:

Originally Posted by silly rabbit
JIPADDRESS is the system detected IP of person logging & $val is an element out of your 'banning list'. Would think it'd be a simple matter to test both IPADDRESS(your job IP) and the current forumid / user trying to log in.

As I recall, the ip test is so early in the process that the user details are not known at that point.

silly rabbit 11-10-2005 09:35 PM

Quote:

Originally Posted by Paul M
As I recall, the ip test is so early in the process . . .

If that is indeed the case then perhaps I am set - simply set userid(forumid??)

Look HERE

Either way I suspect this test is called repeatedly/constantly as .php progresses on it's merry way. Test the userids you do not want to 'pass thru' and eval() out and the rest you simply 'return' out(errr . . . in)!!

I Am NOT At The House And Need My FTP!!!
Can you 'break' from a 'foreach'??
Rabbit

Marco van Herwaarden 11-11-2005 09:58 AM

Quote:

Originally Posted by silly rabbit
Can you 'break' from a 'foreach'??

You can use either 'continue' (will process the next item in the loop), or 'break' (will jump out of the loop.


All times are GMT. The time now is 12:36 AM.

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.03830 seconds
  • Memory Usage 1,723KB
  • 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_quote_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