vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Advanced Ipban Manager (https://vborg.vbsupport.ru/showthread.php?t=227013)

Carnage 04-15-2010 06:05 PM

PHP Code:

$ip=sprintf("%u",ip2long($vbulletin->GPC['ip'])); 

That line casts to an unsigned int should raise the max allowed value to 2147483647*2

Try replacing instances of
PHP Code:

$ip=sprintf("%u",ip2long($vbulletin->GPC['ip'])); 

with
PHP Code:

$ip=ip2long($vbulletin->GPC['ip']); 

but you will need to change the database coloum type from unsigned to signed.

TheVoidz 04-16-2010 03:18 AM

PHP Code:

$ip=sprintf("%u",ip2long($vbulletin->GPC['ip'])); 

Makes the $ip a string with a max value of 2147483647*2. Then when PHP needs to do arithmetic on the string it implicitly casts it to a float if it is larger then 2147483647 (for 32-bit systems) otherwise an int. On 64-bit systems PHP expands integers to 2^64.

Right, I had already figured out the problem. I removed the sprintf and allowed the AND to be done with the integers then printed it as an unsigned int in the query.

Your solution works perfectly.

Carnage 04-17-2010 12:13 PM

I didn't realize that php would automatically convert back till I consulted the documentation following your issue the fix for 32 bit systems will be in the next release.

mordor1 04-24-2010 01:23 PM

When i try to import md5_sums_ipbans.xml I get the following error

XML Error: Invalid document end at Line 16

using vb 4.0.3 Patch Level 1

Carnage 04-25-2010 04:48 PM

Thats in the uploads folder for a reason :P upload it don't import it, it stops vbulletin from seeing the mods files as being 'not a part of vbulletin' in the diagnostic tools, it also makes sure that the files that come with this mod have not become currupt.

mordor1 04-25-2010 06:10 PM

Tanks got the right file now :) Good mod :up:

djackson265 04-27-2010 03:11 AM

Would it be too much to ask for specific instructions for setting permissions to make this feature available for a user account, or for the administrators group?

Carnage 04-27-2010 11:08 AM

In order to make this avaliable for a user, they must be an administrator. Then you need to edit their admin permissions and give them the can admin ipbans permission.

mhme 07-22-2010 03:29 AM

Quote:

Originally Posted by Carnage- (Post 2022641)
The fix for 32 bit systems will be in the next release.

I can't fix the problem manually. so waiting for next release.

Alfa1 07-22-2010 05:24 PM

Does this work for vb 3.8.5?
Does this modification allow us to prevent blocking collective proxy IPs like AOL has? (blocking one AOL IP will block a mass of different AOL IPs)


All times are GMT. The time now is 11:28 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.02138 seconds
  • Memory Usage 1,745KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete