Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here
NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

Pages: [1]   Go Down
  Print  
Author Topic: GeoIP plugin  (Read 2287 times) Bookmark and Share
Newbie
*
OS: Linux
Type: Renting Server with B3
Posts: 5
Offline Offline
« on: March 05, 2011, 01:29:06 PM »

I wrote a GeoIP plugin.
It uses the GeoIP python library from maxmind http://www.maxmind.com/app/python

So you have to install that.

then:
!geoip <player>
will spit out
city, region_name, country_name

I have it on github:
https://github.com/krsanky/b3-geoip

PS. There is a python only geoip library that I'm pretty sure I could get to work
if installing the Maxmind one is not an option.


======== How to Install ============
1. install Maxmind's GeoIP stuff.
http://www.maxmind.com/app/python
Both the C library and the python bindings.
(some linuxes prob. have packages for them.)

2. Get the free City data file:
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip it and put it somewhere.
Mine is at /usr/share/GeoIP/

3. Put the full path to the above file into plugin_geoip.xml

4. Put geoip.py in your extplugins folder.
5. Put plugin_geoip.xml into the extplugins/conf folder.

6. Add   <plugin config="/data/b3/extplugins/conf/plugin_geoip.xml" name="geoip" />
to your b3.xml
(modify according to where you put it on your system.)





« Last Edit: March 05, 2011, 01:49:18 PM by creeper-um3 » Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3484
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #1 on: March 05, 2011, 04:10:54 PM »

Welcome here creeper Smiley

Thanks for your contribution. If you want to give more visibility to your plugin, please package it up in a zip file and upload it to the 'download' section of this website.
Logged

Newbie
*
OS: Linux
Type: Renting Server with B3
Posts: 5
Offline Offline
« Reply #2 on: March 05, 2011, 05:35:53 PM »

I wrote it for UrT, but I don't think there's anything in it specific to UrT.

Here's the download as a zip:
http://forum.bigbrotherbot.net/index.php?action=downloads;sa=downfile&id=134

Logged
Newbie
*
OS: --No B3 installed--
Type: --No B3 installed--
Posts: 6
Offline Offline
« Reply #3 on: March 08, 2011, 01:29:17 AM »

Hi!

Nice Idea!

How can i change the behavior so that it welcomes people when connecting like this:

Welcome <Player> connecting from <Country>

That would be cool.

regards,
Feodor
Logged
XLRstats dev.
Dev. Team
*
OS: Linux
Type: Home user
Gameservers: COD5, COD7, BF3
Posts: 947
Offline Offline
WWW
Support Specialty: XLRstats webfront
« Reply #4 on: March 08, 2011, 08:08:43 AM »

@feodor; please check this plugin -> http://forum.bigbrotherbot.net/downloads/?sa=view;down=12
Logged

Tags: geoip 
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal