In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

You are here: Big Brother Bot ForumSupport ForumsGeneral Usage Support (Moderator: MordyT)Custom configuration of plugins
Pages: [1]   Go Down
  Print  
Author Topic: Custom configuration of plugins  (Read 1966 times) Bookmark and Share
Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 14
Offline Offline
WWW
« on: January 03, 2010, 05:56:02 PM »

Hi,

I'm new here so first of all hi there and happy new year !!

I have a b3 bot running, and the documentation says that I should copy to another directory the configuration files that I want to customize from the b3 installation directory, and then start the bot pointing it to the main configuration file on that directory with with the -c parameter. As I understand it, any file under {b3_install_path}/b3/conf/* that I want to modify should be copied to that same directory and modify that copy, right ? well it isn't working for me. I want to change the spam messages of the admin plugin but it only works when I modify the original files in the installation directory of b3. Which is the correct way of doing this ?
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: January 04, 2010, 01:38:19 AM »

Hi happy new year too  Wink

you should copy the directory (not just a few files) {b3_install_path}/b3/conf to another location

Logged

Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 14
Offline Offline
WWW
« Reply #2 on: January 04, 2010, 05:16:09 AM »

Hi,

That's what I did, created a b3/conf dir in another place and then copied all the files of {b3_install_path}/b3/conf/* there, isn't that the same ?

Thanks for the answer.
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3484
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #3 on: January 04, 2010, 05:27:36 AM »

that should work so.

Any error message ?
Logged

Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 14
Offline Offline
WWW
« Reply #4 on: January 04, 2010, 06:59:17 AM »

Not that I remember, at least on the game, it just show the default messages instead of mines, for example when doing !spam forum, !warntest rule1, etc.

If there could be an error on the log file I'll have to repeat the test tonight, I started to work on the default files directly (but saved a copy of course).
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3484
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #5 on: January 04, 2010, 08:12:05 AM »

you could rename the default conf folder while testing so you can be sure the bot is not loading the default config.
Logged

Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 14
Offline Offline
WWW
« Reply #6 on: January 04, 2010, 04:20:56 PM »

Tried that but the bot didn't start. I moved the default config dir (the one that I already had modified) to my home dir and tried to start the bot pointing to the config file in that dir and this is the output:

Code:
[juancho@maeztro b3-1.2.1]$ python ./b3_run.py -c /home/juancho/b3/conf/b3.xml
Starting www.BigBrotherBot.com (b3) v1.2.1 [posix] (Daniel)

Using config file: /home/juancho/b3/conf/b3.xml
Activating log   : /home/juancho/b3/b3.log     
Connecting to DB : OK                         
Using Gamelog    : /home/juancho/.q3a/q3ut4/games.log
Testing RCON     : OK                               
Loading Events   : 32 events loaded
Loading Plugins  : [juancho@maeztro b3-1.2.1]$

This is the error on the log file:

Code:
100104 19:07:51 BOT     www.BigBrotherBot.com (b3) v1.2.1 [posix] (Daniel)
100104 19:07:51 BOT     Python: 2.6.4 (r264:75706, Oct 27 2009, 15:51:44)
[GCC 4.4.1]
100104 19:07:51 BOT     Starting Iourt41Parser server for 127.0.0.1:27960
100104 19:07:51 BOT     --------------------------------------------
100104 19:07:51 BOT     Attempting to connect to database mysql://b3:******@localhost/b3...
100104 19:07:51 BOT     Connected to database [1 times]
100104 19:07:51 BOT     Game log /home/juancho/.q3a/q3ut4/games.log
100104 19:07:51 BOT     Starting bot reading file /home/juancho/.q3a/q3ut4/games.log
100104 19:07:51 VERBOSE RCON sending (127.0.0.1:27960) status
100104 19:07:51 BOT     Loading Plugin #1 censor [/opt/b3-1.2.1/b3/conf/plugin_censor.xml]
100104 19:07:51 BOT     CensorPlugin: Loading config /opt/b3-1.2.1/b3/conf/plugin_censor.xml for CensorPlugin
100104 19:07:51 CRITICAL        CensorPlugin: Could not find config file
Traceback (most recent call last):
  File "/opt/b3-1.2.1/b3/plugin.py", line 76, in loadConfig
    self.config = b3.config.load(fileName)
  File "/opt/b3-1.2.1/b3/config.py", line 240, in load
    if config.load(fileName):
  File "/opt/b3-1.2.1/b3/config.py", line 165, in load
    raise ConfigFileNotFound(fileName)
ConfigFileNotFound: '/opt/b3-1.2.1/b3/conf/plugin_censor.xml'

As you can see is still trying to look at the install path for the config files.
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3484
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #7 on: January 04, 2010, 04:29:46 PM »

in your config files, '@b3' is an alias for your b3 installation directory (/opt/b3-1.2.1/b3/ in your case)

You'd better use the '@conf' alias which is always the directory where your b3.xml is located (the one you specify with the '-c' option)
Logged

Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 14
Offline Offline
WWW
« Reply #8 on: January 04, 2010, 04:40:14 PM »

Well that's something that isn't mentioned in the documentation, anyway, it doesn't work either:

Code:
100104 19:35:09 BOT     Loading Plugin #1 censor [@conf/plugin_censor.xml]
100104 19:35:09 BOT     CensorPlugin: Loading config @conf/plugin_censor.xml for CensorPlugin
100104 19:35:09 CRITICAL        CensorPlugin: Could not find config file
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3484
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #9 on: January 04, 2010, 04:48:29 PM »

use absolute path in your config file. that must work with absolute path.

I'll try to reproduce the @conf issue on my side.

Can you give more details on how you installed b3 ?
from what package have you installed b3 1.2.1 (python egg, src, other ?)
what is your operating system
Logged

Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 14
Offline Offline
WWW
« Reply #10 on: January 04, 2010, 08:41:26 PM »

If having to hardcode the path to the config files I think is the same to just edit the default files. About my setup:

b3 1.2.1 packages installed by following source configuration instructions as the package instructions page in the documentation is completely empty. The bot is running on a Mandriva 2010 system with python 2.6.
Logged

Tags: plugins  configuration 
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal