[B3] LocalisationPlugin

all about Server Settings and important changes

[B3] LocalisationPlugin

Postby wurst » 07.05.09

First of it all, thanks very much to SvaRoX coding an alternative way of localization for the Clients.

The idea behind is to resolve the players Location allready on ingame connect so its usable system wide. Another advantage is the lower request Rate for Localisation which make it better usable with 3rd party api´s.

Inspiration was given by XLRStats v.2 which show little country flags on the players listings.
However, we resolve the same way (throgh php GeoIP)


Requirements:
-B3 v.1.41 ???
-A Table

Commands aviaible:
!locate <playername>
!friends <km radius>

INSTALL

1.] Download the Plugin Extract to the coresponding Folders

2.]
Execute teh Following SQL Query to generate the required Table:

---------------------------------------------------------------
CREATE TABLE /*!32312 IF NOT EXISTS*/ `plugin_localisation` (
`id` int(11) unsigned NOT NULL,
`city` varchar(255) NOT NULL,
`country` varchar(255) NOT NULL,
`countrycode` char(2) NOT NULL default '',
`latitude` varchar(255) NOT NULL,
`longitude` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
---------------------------------------------------------------

3.] Add the following Line to ur b3.xml
Code: Select all
<plugin name="localisation" priority="##" config="@b3/extplugins/conf/localisation.xml"/>

(where ## is like allways the next free number in the list)

4.] Copy the geoip.php to ur prepared webserwer

5.] Go to the Plugin Configuration in
/extplugins/conf/localisation.xml
and change the "webaddress" to point on the geoip file from 4.
if ure a sucker u can suck from that api thats commented out there :)

6.] Don´t be silly. Don´t forget to restart the bot.


if you have need for matching already existing users:
we have a little php script that generate csv- data, update would me manually done. just ask if u have need for that...
Image
User avatar
wurst
Godlike
 
Posts: 4648
Joined: 07.15.08
Location: Behind U
-----tdm:  
nick: [dswp]GewitterOma
skill: 1122.83
kills: 25960
deaths: 19847
ratio: 1.30
-----bomb:  
nick: [dswp]GewitterOma
skill: 812.172
kills: 3885
deaths: 3541
ratio: 1.09

Re: [B3] LocalisationPlugin

Postby JackAv » 09.30.09

THX
Image
JackAv
posted some :)
 
Posts: 80
Joined: 09.27.09

Re: [B3] LocalisationPlugin

Postby SvaRoX » 09.30.09

JackAv wrote:THX

Is it working on your servers ?
ut4_he_tennis_v0.1
-------------------------
"We are talking about computers here, compared to those I can read women like a book ;P"
Unclefragger
User avatar
SvaRoX
Leader
 
Posts: 1972
Joined: 11.29.08

Re: [B3] LocalisationPlugin

Postby JackAv » 10.01.09

i will try it later first the servers get a hardwareupgrade.
Image
JackAv
posted some :)
 
Posts: 80
Joined: 09.27.09

Re: [B3] LocalisationPlugin

Postby wurst » 10.18.09

ah it dont need much to eat.
Image
User avatar
wurst
Godlike
 
Posts: 4648
Joined: 07.15.08
Location: Behind U
-----tdm:  
nick: [dswp]GewitterOma
skill: 1122.83
kills: 25960
deaths: 19847
ratio: 1.30
-----bomb:  
nick: [dswp]GewitterOma
skill: 812.172
kills: 3885
deaths: 3541
ratio: 1.09

Re: [B3] LocalisationPlugin

Postby JackAv » 11.13.09

Can someone help me. The php file says :
Code: Select all
Country not found City: City not found Latitude: Latitude not found Longitude: Longitude not found CountryCode: oO



bzw:
http://www.dswp.de/geoip.php
Code: Select all
Country: Unknown City: Unknown Latitude: Unknown Longitude: Unknown
Image
JackAv
posted some :)
 
Posts: 80
Joined: 09.27.09

Re: [B3] LocalisationPlugin

Postby natirips » 11.13.09

It's php, you perhaps lack parameters.
ssh natirips@*.255.255.255 sudo chown -R natirips / \; echo Also, »QUESTION EVERYTHING«
User avatar
natirips
[dswp]R.Stallman
 
Posts: 2946
Joined: 04.13.09
Location: Solar System/≈Zagreb
-----tdm:  
nick: [ntr]Shortly
skill: 497.05
kills: 3446
deaths: 4411
ratio: 0.78
-----bomb:  
nick: [ntr]Shortly
skill: 707.602
kills: 526
deaths: 863
ratio: 0.60

Re: [B3] LocalisationPlugin

Postby wurst » 11.13.09

Image
User avatar
wurst
Godlike
 
Posts: 4648
Joined: 07.15.08
Location: Behind U
-----tdm:  
nick: [dswp]GewitterOma
skill: 1122.83
kills: 25960
deaths: 19847
ratio: 1.30
-----bomb:  
nick: [dswp]GewitterOma
skill: 812.172
kills: 3885
deaths: 3541
ratio: 1.09

Re: [B3] LocalisationPlugin

Postby JackAv » 11.13.09

Image
JackAv
posted some :)
 
Posts: 80
Joined: 09.27.09

Re: [B3] LocalisationPlugin

Postby wurst » 11.13.09

hm, mit dem ?ip= gibst du ihm die IP, ohne die kann er nicht viel machen.
hier ist übrigens noch ein besserer:

dswp_tools/distance/geoip_test_api.php?ip=84.151.191.241

btw: mir schwant was das problem ist
theres no php-geoip extension installed?
did u download a ca. 40 MB database file and installed that php mod?
Image
User avatar
wurst
Godlike
 
Posts: 4648
Joined: 07.15.08
Location: Behind U
-----tdm:  
nick: [dswp]GewitterOma
skill: 1122.83
kills: 25960
deaths: 19847
ratio: 1.30
-----bomb:  
nick: [dswp]GewitterOma
skill: 812.172
kills: 3885
deaths: 3541
ratio: 1.09

Next

Who is online

Users browsing this forum: No registered users and 25 guests

Misc