thankyou
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
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!

Author Topic: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]  (Read 35960 times)

Offline Freelander

  • XLRstats dev.
  • Dev. Team
  • Hero Member
  • *
  • Posts: 1000
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #45 on: May 25, 2011, 02:09:39 PM »
You need to download GeoIP.dat and set the correct path to this file in your plugin config file. Download location is in the readme file.

Offline Jerreee

  • Newbie
  • *
  • Posts: 2
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #46 on: May 26, 2011, 08:25:58 PM »
You need to download GeoIP.dat and set the correct path to this file in your plugin config file. Download location is in the readme file.

I've done that, downloaded the GeopIP.dat and followed the readme file. But it still wont work ..

Edit: nvm, i've fixed it. Was idd something wrong with the pad
« Last Edit: May 27, 2011, 01:57:39 AM by Jerreee »

Offline -real-

  • Full Member
  • ***
  • Posts: 66
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #47 on: July 18, 2011, 10:24:14 PM »
Code: [Select]
110718 23:21:37	ERROR	'handler CountryfilterPlugin could not handle event Client Authenticated: error: unpack requires a string argument of length 4 [(\'/home/cod4/bot/b3/parser.py\', 961, \'handleEvents\', \'hfunc.parseEvent(event)\'), (\'/home/cod4/bot/b3/plugin.py\', 157, \'parseEvent\', \'self.onEvent(event)\'), (\'/home/cod4/bot/b3/extplugins/countryfilter.py\', 181, \'onEvent\', \'self.onPlayerConnect(event.client)\'), (\'/home/cod4/bot/b3/extplugins/countryfilter.py\', 196, \'onPlayerConnect\', \'countryId = self.gi.id_by_addr(str(client.ip))\'), (\'/home/cod4/bot/b3/lib/PurePythonGeoIP.py\', 98, \'id_by_addr\', \'return self.__seek_country(self.addr_to_num(ip_address)) - self.__GEOIP_COUNTRY_BEGIN\'), (\'/home/cod4/bot/b3/lib/PurePythonGeoIP.py\', 83, \'__seek_country\', \'x0, = struct.unpack("<1l", x0 + "\\\\0")\')]'

+ sometimes you plugin doesn't allow allowed countries

Offline -real-

  • Full Member
  • ***
  • Posts: 66
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #48 on: July 19, 2011, 07:19:26 PM »
Code: [Select]
110719 20:11:56	DEBUG	'CountryfilterPlugin: Connecting slot: 12, name: Chunk, ip: 81137.59.166, level: 0'
110719 20:11:56 DEBUG 'CountryfilterPlugin: Country: --'

Code: [Select]
110719 20:17:56	VERBOSE	'Parsing Event: Client Authenticated: CountryfilterPlugin'
110719 20:17:56 DEBUG 'CountryfilterPlugin: Connecting slot: 11, name: Y-G3, ip: 0.234.31.81, level: 0'
110719 20:17:56 DEBUG 'CountryfilterPlugin: Country: --'
110719 20:17:56 VERBOSE 'RCON sending (77.90.192.243:28960) \'PB_SV_Kick "12" "0.5" ": Your country is not allowed on this server." ""\''
« Last Edit: July 19, 2011, 07:22:21 PM by -real- »

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #49 on: July 19, 2011, 07:37:16 PM »
This is a plugin to restrict countries... what is the issue?
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline -real-

  • Full Member
  • ***
  • Posts: 66
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #50 on: July 19, 2011, 09:04:13 PM »
why ip detected as 81137.59.166 ???

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #51 on: July 19, 2011, 09:19:07 PM »
Ah, didn't see that first code...

I really don't know why. You have a excellent question...
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline Freelander

  • XLRstats dev.
  • Dev. Team
  • Hero Member
  • *
  • Posts: 1000
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #52 on: July 19, 2011, 09:32:17 PM »
Can you post the full b3.log? We need to see rcon status output before that line.

Offline MrMind

  • Jr. Member
  • **
  • Posts: 39
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #53 on: November 09, 2011, 10:25:11 AM »
Hello!

Is this plugin works with Windows version B3 and Urban Terror?
« Last Edit: November 09, 2011, 11:45:54 AM by MrMind »

Offline SanKen

  • Sr. Member
  • ****
  • Posts: 212
    • ProGaming - Only Multigaming is the most important
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #54 on: November 09, 2011, 01:03:13 PM »
It does not matter whether linux or windows, supposed to work ...
why not install a python 2.7.2 and MySQL-python-1.2.3 ?
then you will be able to have install source code b3

easy install
« Last Edit: November 09, 2011, 01:07:32 PM by SanKen »
Very sorry for my English I do not know him enough to be understood.
That is why I use the google translator.

Offline MrMind

  • Jr. Member
  • **
  • Posts: 39
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #55 on: November 09, 2011, 01:11:02 PM »
It does not matter whether linux or windows, supposed to work ...
why not install a python 2.7.2 and MySQL-python-1.2.3 ?
then you will be able to have install source code b3

easy install
My server hosted by a game server provider and UrT is on Linux and B3 is on a Windows Server. I tired to set this plugin, but won't work. I will post the log file tonight.
« Last Edit: November 09, 2011, 01:15:03 PM by MrMind »

Offline MrMind

  • Jr. Member
  • **
  • Posts: 39
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #56 on: November 09, 2011, 09:42:48 PM »
Hello!

This plugin won't worok for me. Here is the b3.log: http://pastebin.com/Mm6PcHPT

The path to the GeoIP.dat file is good in the xml. and .py files too.

Thx in advance.
« Last Edit: November 09, 2011, 09:55:03 PM by MrMind »

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2605
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #57 on: November 09, 2011, 10:12:15 PM »
It won't work with the Win standalone version, you need to use the python egg or source code version in order to use it.

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #58 on: November 09, 2011, 10:44:54 PM »
It won't work with the Win standalone version, you need to use the python egg or source code version in order to use it.

It works for me with windows standalone....

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2605
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #59 on: November 10, 2011, 01:46:33 AM »
It works for me with windows standalone....

Ah, my mistake,  I was thinking of Geowelcome that doesn't work.

 


Rate this page +1 at Google Search

anything