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 34896 times)

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #75 on: January 30, 2012, 11:28:48 PM »
hey can i anyone give me the updated GEOIP.DAT file, dont say download it from the maxmind website coz the link is screwed up, its broken not working, some1 upload it to mediafire and give me the link.... Thanks in advance
Try this:
http://www.rvoclan.com/xlrstats/GeoIP/GeoIP.dat
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 islamsaab

  • Jr. Member
  • **
  • Posts: 45
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #76 on: September 03, 2012, 06:15:07 PM »
i just did as you said:


"3. Open your B3.xml file (in b3/conf) and add the next line in the
<plugins> section of the file:

<plugin name="countryfilter" priority="12" config="@b3/extplugins/conf/countryfilter.xml"/>

The number 12 in this just an example. Make sure it fits your
plugin list.
"
wich plugins should i have to make it work? GeoIP Welcom plugin maybe???
for testing i put my country and i change my admin lvl to member. but it not kicked me.

Offline dpi

  • Newbie
  • *
  • Posts: 1
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #77 on: February 26, 2013, 01:11:02 PM »
It should be noted that this plugin works with Battlefield 3 as in Git HEAD.

Op: Please update thread title.

Offline arifrezza

  • Jr. Member
  • **
  • Posts: 11
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]
« Reply #78 on: April 13, 2013, 12:08:56 AM »
!cfcountry command works for me.. But why this plugin doesn't show the country automatically when a player joins? Please help!!!!

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]
« Reply #79 on: April 23, 2013, 08:45:53 PM »
!cfcountry command works for me.. But why this plugin doesn't show the country automatically when a player joins? Please help!!!!
You might need the geowelcome plugin for that.
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 arifrezza

  • Jr. Member
  • **
  • Posts: 11
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]
« Reply #80 on: April 24, 2013, 08:07:28 PM »
Thanks... got it worked... 

Offline Canta

  • Jr. Member
  • **
  • Posts: 15
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]
« Reply #81 on: April 29, 2013, 03:32:18 AM »
I wanted to put
<set name="maxlevel"> 100 </ set>
does not work.
Only works maxLevel 1.
I want you to not ignore any level.
I'm doing something wrong or do not leave this plugin?
thanks

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]
« Reply #82 on: April 29, 2013, 03:35:57 PM »
how about:

<set name="maxlevel">superadmin</ set> OR
<set name="maxlevel">100</ set> (i took the spaces out)

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 Canta

  • Jr. Member
  • **
  • Posts: 15
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]
« Reply #83 on: April 29, 2013, 07:17:03 PM »
tested in these ways:

<set name="maxlevel">superadmin</set>
<set name="maxlevel">100</set>
<set name="maxlevel"></set>

Always get the log like this:

130429 19:05:12   DEBUG   'CountryfilterPlugin: Ignored names: []'
130429 19:05:12   DEBUG   "CountryfilterPlugin: Ignored IP's: []"
130429 19:05:12   DEBUG   'CountryfilterPlugin: Ignored maxLevel: 1'

not working ???

Offline Canta

  • Jr. Member
  • **
  • Posts: 15
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]
« Reply #84 on: April 29, 2013, 11:46:04 PM »
The problem is that editing the countryfilter.xml not work, to ignore ips, names and level.
You need to edit the countryfilter.py and if it works.
Example:
Default lines countryfilter.py:
     ignore_names = []
     ignore_ips = []
     _maxLevel = 1

Edit:
    ignore_names = 'dani,MordyT'
    ignore_ips = '1.23.22.1,52.26.45.3'
    _maxLevel = 100
and if it works ;)

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]
« Reply #85 on: April 30, 2013, 12:24:18 AM »
The problem is that editing the countryfilter.xml not work, to ignore ips, names and level.
You need to edit the countryfilter.py and if it works.
Example:
Default lines countryfilter.py:
     ignore_names = []
     ignore_ips = []
     _maxLevel = 1

Edit:
    ignore_names = 'dani,MordyT'
    ignore_ips = '1.23.22.1,52.26.45.3'
    _maxLevel = 100
and if it works ;)
Interesting find. So basically, the xml is not being loaded/accepted, so it falls back to the info in the .py
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 davidm23

  • Newbie
  • *
  • Posts: 1
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP]
« Reply #86 on: March 29, 2017, 07:40:11 PM »
Hello!

As I see in the b3.log: "No module named countryfilter"

Code: [Select]
#
111109 21:36:58 BOT     'Loading Plugin #17 countryfilter [G:\\users\\b3avocadoo488\\extplugins\\conf\\countryfilter.xml]'
#
111109 21:36:58 INFO    'Could not load built in plugin countryfilter (No module named countryfilter)'
#
111109 21:36:58 INFO    'trying external plugin directory : G:\\users\\b3avocadoo488\\extplugins'
#
111109 21:36:58 BOT     'CountryfilterPlugin: Loading config G:\\users\\b3avocadoo488\\extplugins\\conf\\countryfilter.xml for CountryfilterPlugin'
#
111109 21:36:58 VERBOSE 'CountryfilterPlugin: Loading config'
#
111109 21:36:58 DEBUG   'CountryfilterPlugin: Ignored names: []'
#
111109 21:36:58 DEBUG   "CountryfilterPlugin: Ignored IP's: []"
#
111109 21:36:58 DEBUG   'CountryfilterPlugin: Ignored maxLevel: 1'
#
111109 21:36:58 DEBUG   'Register Event: Stop Process: CountryfilterPlugin'
#
111109 21:36:58 DEBUG   'Register Event: Program Exit: CountryfilterPlugin'
#
111109 21:36:58 BOT     'Plugin countryfilter (1.2.1 - guwashi / xlr8or) loaded'

I have no idea what's the problem because the paths are good, and here is the code what I inserted into b3.xml

Code: [Select]
<plugin config="@b3/extplugins/conf/countryfilter.xml" name="countryfilter"/>

Thanks for the help.




I have the exact same problem here with this post. Plugin seems to work in logs but when I try to do !cfcountry, it says "there was an error processing your command". I'm using python 2.7 version B3 1.9.2. 


B3 log of countryfilter part
Code: [Select]
'Loading Plugin #4 countryfilter [C:\\Python27\\Lib\\site-packages\\b3-1.9.2\\b3\\extplugins\\conf\\countryfilter.xml]'
170329 20:36:03 INFO 'countryfilter is not a built-in plugin (No module named countryfilter)'
170329 20:36:03 INFO 'trying external plugin directory : C:\\Python27\\Lib\\site-packages\\b3-1.9.2\\b3\\extplugins'
170329 20:36:03 BOT     'CountryfilterPlugin: Loading config C:\\Python27\\Lib\\site-packages\\b3-1.9.2\\b3\\extplugins\\conf\\countryfilter.xml for CountryfilterPlugin'
170329 20:36:03 VERBOSE 'CountryfilterPlugin: Loading config'
170329 20:36:03 DEBUG "CountryfilterPlugin: Ignored names: ['']"
170329 20:36:03 DEBUG "CountryfilterPlugin: Ignored IP's: ['']"
170329 20:36:03 DEBUG 'CountryfilterPlugin: Ignored maxLevel: 1'
170329 20:36:03 DEBUG "CountryfilterPlugin: Blocked IP's: ['']"
170329 20:36:03 DEBUG 'CountryfilterPlugin: Checking if connected players are allowed to connect.'
170329 20:36:03 DEBUG 'Register Event: Stop Process: CountryfilterPlugin'
170329 20:36:03 DEBUG 'Register Event: Program Exit: CountryfilterPlugin'
170329 20:36:03 BOT     'Plugin countryfilter (1.5 - guwashi / xlr8or) loaded'
170329 20:36:03 BOT    

B3 Config
Code: [Select]
<?xml version='1.0' encoding='UTF-8'?>
<!--
 This file is generated by the B3 setup Procedure.
 If you want to regenerate this file and make sure the format is
 correct, you can invoke the setup procedure with the
 command : b3_run -s b3.xml

 This is B3 main config file (the one you specify when you run B3 with the
 command : b3_run -c b3.xml)

 For any change made in this config file, you have to restart the bot.
 Whenever you can specify a file/directory path, the following shortcuts
 can be used :
  @b3 : the folder where B3 code is installed in
  @conf : the folder containing this config file
 -->
<configuration>
<settings name="b3">
<!-- Define your game: cod/cod2/cod4/cod5/cod6/cod7/cod8
                  iourt41/iourt42
                  bfbc2/bf3/moh
                  etpro/altitude/oa081/smg/sof2/wop/wop15
                  homefront/ro2/csgo/ravaged/arma2 -->
<set name="parser">cod7</set>
<!-- Your database info: [mysql]://[db-user]:[db-password]@[db-server[:port]]/[db-name] -->
<set name="database">mysql://b3:[email protected]/b3</set>
<!-- Name of the bot -->
<set name="bot_name">B3</set>
<!-- Ingame messages are prefixed with this code, you can use colorcodes -->
<set name="bot_prefix">^0(^4B3^0)^7:</set>
<set name="time_format">%I:%M%p %Z %d/%m/%y</set>
<!-- The timezone your bot is in -->
<set name="time_zone">CET</set>
<!-- How much detail in the logfile: 9 = verbose, 10 = debug, 21 = bot, 22 = console -->
<set name="log_level">9</set>
<!-- Name of the logfile the bot will generate -->
<set name="logfile">@conf/b3.log</set>
</settings>
<settings name="server">
<!-- The RCON pass of your gameserver -->
<set name="rcon_password">*****</set>
<!-- The port the server is running on -->
<set name="port">3084</set>
<!-- The gameserver generates a logfile, put the path and name here -->
<set name="game_log">*****</set>
<!-- The public IP your gameserver is residing on -->
<set name="public_ip">108.61.112.157</set>
<!-- The IP the bot can use to send RCON commands to (127.0.0.1 when on the same box) -->
<set name="rcon_ip">108.61.112.157</set>
<!-- Delay between each log reading. Set a higher value to consume less disk resources or bandwidth if you remotely connect (ftp or http remote log access) -->
<set name="delay">0.33</set>
<!-- Number of lines to process per second. Set a lower value to consume less CPU resources -->
<set name="lines_per_second">50</set>
<!-- Is the gameserver running PunkBuster Anticheat: on/off -->
<!-- set name="punkbuster">off</set -->
</settings>
<settings name="update">
<!-- B3 checks if a new version is available at startup. Choose here what channel you want to check against.
            Available channels are :
                stable : will only show stable releases of B3
                beta   : will also check if a beta release is available
                dev    : will also check if a development release is available
            If you don't know what channel to use, use 'stable'
         -->

<!-- stable, beta or dev -->
<set name="channel">stable</set>
</settings>
<settings name="autodoc">
<!-- Autodoc will generate a user documentation for all B3 commands -->
<!-- by default, a html documentation is created in your conf folder -->

<!-- html, htmltable or xml -->
<set name="type">html</set>
<!-- if you want to exclude commands reserved for higher levels -->
<set name="maxlevel">100</set>
<!-- Destination can be a file or a ftp url -->
<set name="destination">b3_doc.htm</set>
</settings>
<settings name="messages">
<set name="kicked_by">$clientname^7 was kicked by $adminname^7 $reason</set>
<set name="kicked">$clientname^7 was kicked $reason</set>
<set name="banned_by">$clientname^7 was banned by $adminname^7 $reason</set>
<set name="banned">$clientname^7 was banned $reason</set>
<set name="temp_banned_by">$clientname^7 was temp banned by $adminname^7 for $banduration^7 $reason</set>
<set name="temp_banned">$clientname^7 was temp banned for $banduration^7 $reason</set>
<set name="unbanned_by">$clientname^7 was un-banned by $adminname^7 $reason</set>
<set name="unbanned">$clientname^7 was un-banned $reason</set>
</settings>
<settings name="plugins">
<set name="external_dir">@b3/extplugins</set>
</settings>
<plugins>
<!-- plugin order is important. Plugins that add new in-game commands all depend on the admin plugin. Make sure to have the admin plugin before them. -->
<plugin config="@conf/plugin_admin.xml" name="admin" />
<!-- plugin config="@conf/plugin_censor.xml" name="censor" / -->
<!-- plugin config="@conf/plugin_spamcontrol.xml" name="spamcontrol" / -->
<plugin config="@conf/plugin_stats.xml" name="stats" />
<plugin config="@conf/plugin_status.xml" name="status" />
<!--plugin config="@conf/plugin_welcome.xml" name="welcome" /-->
           <plugin config="@b3/extplugins/conf/countryfilter.xml" name="countryfilter" />
<!--plugin name="rotationmanager" config="@b3/extplugins/conf/rotationmanager.xml"/-->
<plugin name="antinoob" priority="9" config="@b3/extplugins/conf/antinoob.xml"/>

<plugin name="xlrstats" priority="10" config="@b3/extplugins/conf/xlrstats.xml"/>
<plugin name="awardsxlrstats" priority="11" config="@b3/extplugins/conf/awardsxlrstats.xml"/>
<plugin config="@conf/plugin_adv.xml" name="adv" />
<!--plugin config="@b3/extplugins/conf/plugin_masteradmin.xml" name="masteradmin"/-->
<plugin name="poweradmincod7" config="@b3/extplugins/conf/plugin_poweradmincod7.xml"/>
<plugin name="spree" priority="15" config="@b3/extplugins/conf/plugin_spree.xml"/>
<plugin name="autoreg" priority="16" config="@b3/extplugins/conf/autoreg.ini"/>
<plugin name="duel" />
<!--plugin config="@b3/extplugins/conf/plugin_geoip.xml" name="geoip" /-->
<!--plugin name="geowelcome" priority="17" config="@b3/extplugins/conf/geowelcome.xml"/-->
<!-- plugin config="@conf/plugin_punkbuster.xml" name="punkbuster" / -->
<!-- You can add new/custom plugins to this list using the same form as above. -->
</plugins>
</configuration>
« Last Edit: March 29, 2017, 07:42:45 PM by davidm23 »

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2528
Re: CountryFilter [CoD|CoD:UO|CoD2|CoD4|UrT|WoP|BF3]
« Reply #87 on: March 29, 2017, 10:31:50 PM »
Please update to the latest version of B3 1.10.x. and post again if it still doesn't work.

You mat need to add a few python modules, see requirements.txt.

 


Rate this page +1 at Google Search