View Full Version : Need help fast: How to ban an IP except for specific members
JJR512
11-10-2005, 04:01 PM
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
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
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
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 (https://vborg.vbsupport.ru/showthread.php?p=817665#post817665)
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
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.