Raised This Month: $ Target: $400
 0% 

Help fixing this GeoIP plugin to allow bots and LAN address


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kamikaze
Senior Member
Join Date: Mar 2004
Location: Butler, PA
Old 02-08-2005 , 01:01   Help fixing this GeoIP plugin to allow bots and LAN address
Reply With Quote #1

Ok, I have this GEOIP plugin that's made by Eisbein, he refuses to fix this problem so I tried fixing it myself but I can't get it to work. What happens is this plugin will display what country your from and when I connect to my server on the LAN, it will show ERROR for me since I have a LAN IP, all bots on CS/CZ will show the same thing so I wanted to know if it's possible to make it show BOT for BOTs and show LAN for addresses in the 192.168.0.0-192.168.255.255/10.0.0.0-10.255.255.255 ranges. I know this is mainly because of the GEOIP module not understanding Bots or LANs but how do I make it so this plugin will do that check, everything I've tried hasn't worked for me.

Here's the plugin without any changes made to it:

Code:
/* * AMX MODX SCRIPT * * show land / Country in Spect * * by Eisbein >>[email protected] * use / benutze say /country or /land * * mfG PAPA_SCHLUMPF */ #include <amxmodx> #include <geoip> new playerip[17], getcountry[46], country[33][46] public plugin_init() {   register_plugin("Land","1.0","Eisbein")   register_event("StatusValue","show_country","bd","1=2")   register_clcmd("say /country","show_owncountry")   register_clcmd("say /land","show_owncountry")   register_cvar("amx_showcountry","1") } public client_connect(id) {   if (!(get_cvar_num("amx_showcountry")))   {     return PLUGIN_CONTINUE   }   get_user_ip(id, playerip, 16, 1)   geoip_country(playerip,getcountry)   country[id] = getcountry   return PLUGIN_CONTINUE } public show_country(id) {   if (!(get_cvar_num("amx_showcountry")))   {     return PLUGIN_CONTINUE   }   new target = read_data(2)   if (target != id && target != 0)   {     set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, 27)     show_hudmessage(id,"%s",country[target])   }   return PLUGIN_CONTINUE } public show_owncountry(id) {   client_print(id,print_chat,"%s",country[id])   return PLUGIN_HANDLED }
Kamikaze is offline
Send a message via ICQ to Kamikaze Send a message via AIM to Kamikaze Send a message via MSN to Kamikaze Send a message via Yahoo to Kamikaze
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode