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)How to: Restart b3 via in-game commands
Pages: [1] 2   Go Down
  Print  
Author Topic: How to: Restart b3 via in-game commands  (Read 2092 times) Bookmark and Share
Beta Testers
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 43
Offline Offline
WWW
« on: August 04, 2010, 08:14:46 AM »

As the title says, I need the command, or a plugin to do this to my server(s). I am Super Admin [100] obviously, and I do not want to bug our developer every time I change something to do with b3, so he can restart it. I need a command to restart b3 from in-game. Or a rcon command.
Logged



Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3347
Online Online
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #1 on: August 04, 2010, 08:43:35 AM »

starting the bot with the --restart parameter should allow you to use the !restart command in-game
Logged

Beta Testers
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 43
Offline Offline
WWW
« Reply #2 on: August 04, 2010, 08:51:49 AM »

This will restart b3 only, right? Not the server or map.
Logged


Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3347
Online Online
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #3 on: August 04, 2010, 10:14:03 AM »

B3 cannot restart the game server.
B3 can change map or restart a map -> see admin plugin
Logged

Beta Testers
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 43
Offline Offline
WWW
« Reply #4 on: August 04, 2010, 10:20:59 AM »

I did the !restart command, and it PM'd me saying Shutting down for restart... or something like that. Then never came back on.
Logged


Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3347
Online Online
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #5 on: August 04, 2010, 10:22:16 AM »

you need to have started the bot with the --restart parameter in order to get the !restart command to work.
If you did so, then post your b3 log
Logged

Beta Testers
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 43
Offline Offline
WWW
« Reply #6 on: August 04, 2010, 12:13:41 PM »

How do I do this:
started the bot with the --restart parameter
Logged


B3 Contrib/Support
*
OS: Linux
Type: Home user
Gameservers: Over see 25 URT servers / B3 servers (not all mine)
Posts: 339
Offline Offline
WWW
« Reply #7 on: August 04, 2010, 06:15:50 PM »

I am curious also, im using your
Quote
Fully Debian integrated start-stop script for B3
with python 2.6 and she's not restarting
Logged
[ www.xlrstats.com ]
Project Lead
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoD2, CoD5, UrT
Posts: 2007
Offline Offline
WWW
Support Specialty: B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
« Reply #8 on: August 05, 2010, 07:37:17 AM »

I tested this and can confirm that there is a problem with the --restart option in some situations. I'm investigating it and will try to solve it in the next release.
Logged

B3 Contrib/Support
*
OS: Linux
Type: Home user
Gameservers: Over see 25 URT servers / B3 servers (not all mine)
Posts: 339
Offline Offline
WWW
« Reply #9 on: August 06, 2010, 06:28:53 AM »

here is my log dumps, hope they help  Grin
Code:
!restart in game

Quote
100806 09:51:29 CONSOLE 1:33 say: 0 Pb|RYRY46d9: !restart
100806 09:51:29 VERBOSE Client Found: Pb|RYRY46d9 on slot 0
100806 09:51:29 VERBOSE Queueing event Say !restart
100806 09:51:30 VERBOSE Parsing Event: Say: ChatloggerPlugin
100806 09:51:30 DEBUG   ChatloggerPlugin: ALL, 2, Pb|RYRY46d9, !restart
100806 09:51:30 DEBUG   ChatloggerPlugin: query: INSERT INTO chatlog (msg_time, msg_type, client_id, client_name, client_team, msg) VALUES (1281102690, "ALL", 2, "Pb|RYRY46d9", 3, "!restart")
100806 09:51:30 DEBUG   ChatloggerPlugin: rowcount: 1, id:1126
100806 09:51:30 VERBOSE Parsing Event: Say: ChatPlugin
100806 09:51:30 VERBOSE Parsing Event: Say: SpamcontrolPlugin
100806 09:51:30 VERBOSE Parsing Event: Say: AdminPlugin
100806 09:51:30 DEBUG   AdminPlugin: OnSay handle 5:"!restart"
100806 09:51:30 DEBUG   AdminPlugin: Handle command !restart
100806 09:51:30 VERBOSE RCON sending (ryry.mine.nu:27960) tell 0 ^0(^2The BabySitter^0)^7: ^3[pm]^7 ^7Shutting down for restart...
100806 09:51:30 BOT     Shutting down...
100806 09:51:30 DEBUG   PoweradminurtPlugin: poweradminurt.dumpEvent -- Type 2, Client None, Target None, Data
100806 09:51:30 VERBOSE AdvPlugin: Warning: No handle func for AdvPlugin
100806 09:51:30 BOT     Stop reading.
100806 09:51:30 DEBUG   XlrstatsPlugin: xlrstats.dumpEvent -- Type 2, Client None, Target None, Data
100806 09:51:30 INFO    PublistPlugin: Sending shutdown info to B3 master
100806 09:51:30 VERBOSE FtpytailPlugin: B3 is down, stopping Ftpytail thread
100806 09:51:31 INFO    PublistPlugin: B3 masterserver refused the heartbeat. reason: Bad Request
100806 09:51:31 INFO    StatusPlugin: B3 stop/exit.. updating status
100806 09:51:31 DEBUG   StatusPlugin: Writing XML status to /home/pbtarget/status.xml
100806 09:51:31 VERBOSE FtpytailPlugin: Warning: No handle func for FtpytailPlugin
100806 09:51:31 VERBOSE VotingPlugin: Warning: No handle func for VotingPlugin
100806 09:51:31 BOT     Shutting down database connections...
100806 09:51:36 BOT     Restarting...
100806 09:51:36 BOT     Shutting down event handler
100806 09:51:36 INFO    STDOUT Exiting: 221
100806 09:51:36 INFO    STDOUT

100806 09:51:36 INFO    STDOUT 221
100806 09:51:36 INFO    STDOUT
but if I do it on the B3 server
Code:
sudo /etc/init.d/pbtarget restart
Quote
100806 10:20:18 BOT     TERM signal received. Shutting down
100806 10:20:18 BOT     Shutting down...
100806 10:20:18 DEBUG   PoweradminurtPlugin: poweradminurt.dumpEvent -- Type 2, Client None, Target None, Data
100806 10:20:18 VERBOSE AdvPlugin: Warning: No handle func for AdvPlugin
100806 10:20:18 DEBUG   XlrstatsPlugin: xlrstats.dumpEvent -- Type 2, Client None, Target None, Data
100806 10:20:18 INFO    PublistPlugin: Sending shutdown info to B3 master
100806 10:20:18 VERBOSE FtpytailPlugin: B3 is down, stopping Ftpytail thread
100806 10:20:20 INFO    PublistPlugin: B3 masterserver refused the heartbeat. reason: Bad Request
100806 10:20:20 INFO    StatusPlugin: B3 stop/exit.. updating status
100806 10:20:20 DEBUG   StatusPlugin: Writing XML status to /home/pbtarget/status.xml
100806 10:20:20 VERBOSE FtpytailPlugin: Warning: No handle func for FtpytailPlugin
100806 10:20:20 VERBOSE VotingPlugin: Warning: No handle func for VotingPlugin
100806 10:20:20 BOT     Shutting down database connections...
100806 10:20:20 INFO    STDOUT Exiting: 222
100806 10:20:20 INFO    STDOUT

100806 10:20:20 INFO    STDOUT 222
100806 10:20:20 INFO    STDOUT
she starts right back up
Logged
[ www.xlrstats.com ]
Project Lead
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoD2, CoD5, UrT
Posts: 2007
Offline Offline
WWW
Support Specialty: B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
« Reply #10 on: August 06, 2010, 07:30:17 AM »

I've made a first draft that fixes this --restart bug. It's only tested on the BFBC2 testserver. I need a few extra testers that can confirm this to be the solution.

Feel free to download latest dev version in my repo and pls report back in this thread your experiences along with your setup.
Logged

B3 Contrib/Support
*
OS: Linux
Type: Home user
Gameservers: Over see 25 URT servers / B3 servers (not all mine)
Posts: 339
Offline Offline
WWW
« Reply #11 on: August 14, 2010, 06:41:40 AM »

ok I gave it a go
Quote
(b3) v1.3.4b [posix] (Daniel)
!restart did not work.
I had the loging set to 9 instead of 1 , i'll post that dump later in the day

but I did see something funny

Quote
100814 10:30:34 DEBUG   Client Connected - ready to parse Userinfoline
100814 10:30:34 CONSOLE 0:29 ClientUserinfo: 3 \gear\FLHARUA\team\red\skill\4.000000\characterfile\bots/ut_puma_c.c\color\4\sex\male\race\1\snaps\20\rate\25000\name\Puma
100814 10:30:34 BOT     Bot Connecting!
100814 10:30:34 VERBOSE Parsed user info {'snaps': '20', 'gear': 'FLHARUA', 'characterfile': 'bots/ut_puma_c.c', 'cid': '3', 'color': '4', 'ip': '0.0.0.0', 'sex': 'male', 'cl_guid': 'BOT3', 'rate': '25000', 'race': '1', 'team': 2, 'skill': '4.000000', 'name': 'Puma'}
100814 10:30:34 VERBOSE 0 cid changed from None to 3
100814 10:30:34 DEBUG   Client Connected: [3] Puma - BOT3 ({'guid': 'BOT3'})
100814 10:30:34 DEBUG   Storage: getClient <b3.clients.Client object at 0x9280fec>
100814 10:30:34 DEBUG   User not found BOT3: 'No client matching guid BOT3'
100814 10:30:34 BOT     Client not found in the storage BOT3, create new
100814 10:30:34 DEBUG   Storage: setClient <b3.clients.Client object at 0x9280fec>
100814 10:30:34 DEBUG   Storage: setClient data {'time_add': 1281796234, 'time_edit': 1281796234, 'name': 'Puma', 'group_bits': 0, 'ip': '0.0.0.0', 'greeting': '', 'auto_login': 1, 'connections': 1, 'mask_level': 0, 'guid': 'BOT3', 'pbid': ''}
100814 10:30:34 DEBUG   Client Authorized: [3] Puma - BOT3
100814 10:30:34 VERBOSE Queueing event Client Authenticated <b3.clients.Client object at 0x9280fec>
100814 10:30:34 VERBOSE Parsing Event: Client Authenticated: WelcomePlugin
100814 10:30:34 VERBOSE Parsing Event: Client Authenticated: PoweradminurtPlugin
100814 10:30:34 CONSOLE 0:29 ClientUserinfoChanged: 3 n\Puma\t\3\r\2\tl\0\f0\\f1\\f2\\a0\0\a1\0\a2\0
100814 10:30:34 VERBOSE Parsing Event: Client Authenticated: CtimePlugin
100814 10:30:34 VERBOSE Queueing event Client Team Change 1
100814 10:30:34 DEBUG   CtimePlugin: CTIME CONNECTED: Player Puma^7 started playing at: 2010-08-14 10:30:34.224669
100814 10:30:34 VERBOSE Parsing Event: Client Authenticated: BanlistPlugin
100814 10:30:34 CONSOLE 0:29 ClientBegin: 3
100814 10:30:34 VERBOSE Parsing Event: Client Authenticated: ForumlinkPlugin
100814 10:30:34 DEBUG   BanlistPlugin: checking slot: 3, Puma, 0.0.0.0, BOT3
100814 10:30:34 ERROR   handler ForumlinkPlugin could not handle event Client Authenticated: OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)") [('/home/pbtarget/b3/parser.py', 765, 'handleEvents', 'hfunc.parseEvent(event)'), ('/home/pbtarget/b3/plugin.py', 157, 'parseEvent', 'self.onEvent(event)'), ('/home/pbtarget/b3/extplugins/forumlink.py', 161, 'onEvent', 'self.dbconnect()'), ('/home/pbtarget/b3/extplugins/forumlink.py', 100, 'dbconnect', "self._db = MySQLdb.connect(self.config.get('db','host'),self.config.get('db','username'),self.config.get('db','password'),self.config.get('db','db'))"), ('/usr/lib/pymodules/python2.6/MySQLdb/__init__.py', 81, 'Connect', 'return Connection(*args, **kwargs)'), ('/usr/lib/pymodules/python2.6/MySQLdb/connections.py', 170, '__init__', 'super(Connection, self).__init__(*args, **kwargs2)')]
100814 10:30:34 VERBOSE Parsing Event: Client Authenticated: HaxbusterurtPlugin
100814 10:30:34 INFO    HaxbusterurtPlugin: BOT3 is a not a valid ioUrT guid
100814 10:30:34 INFO    HaxbusterurtPlugin: player @559 (0.0.0.0) has a contestable guid : [BOT3]
100814 10:30:34 DEBUG   Storage: setClientPenalty data {'time_edit': 1281796234, 'keyword': '', 'data': '', 'admin_id': 0, 'reason': 'weird guid detected', 'inactive': 0, 'client_id': 559, 'time_add': 1281796234, 'type': 'Notice'}
100814 10:30:34 VERBOSE RCON sending (67.183.182.137:27960) tell 0 ^0(^2The BabySitter^0)^7: ^3[pm]^7 Puma^7^7 is probably hacking. His guid is [^3BOT3^7]

I lol'ed  on the haxbuster. good to see some head way on the bots and weird to see them in echelon
Quote
103       Cheetah       Saturday, 14/08/2010 (07:30)      weird guid detected       B3
Logged
Moderator
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 3x CoD4, 1x CoD6, 1x BF3
Posts: 2369
Offline Offline
Owner of Host4B3.com - Over 70 bots hosted!
WWW
« Reply #12 on: August 14, 2010, 02:29:25 PM »

Sorry if I am way off track here, OP - you are saying that you just want to be able to make a change to one of the config files and have the bot use the new config, correct?
In that case, why not use the !reconfig command?

*Via my HTC EvO 4G*
Logged

Need B3 Bot hosting? Check out Host4B3.com
Check Twitter.com/Host4B3 for updates if the site it down.

Help will be given to those with a b3.log

System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3347
Online Online
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #13 on: August 14, 2010, 02:36:08 PM »

the !reconfig command does so but not for all plugins. Also if you modified something in b3.xml then you have no choice but restart the bot
Logged

Moderator
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 3x CoD4, 1x CoD6, 1x BF3
Posts: 2369
Offline Offline
Owner of Host4B3.com - Over 70 bots hosted!
WWW
« Reply #14 on: August 14, 2010, 08:40:16 PM »

the !reconfig command does so but not for all plugins. Also if you modified something in b3.xml then you have no choice but restart the bot
Ask, wasn't aware of that. I an running a very minimal bot right now, with just 3 plugins, admin, pb, and anti noob. When I make a change to admin (like a rule), I just use reconfig and I thought that worked with anything..
*Via my HTC EvO 4G*
Logged

Need B3 Bot hosting? Check out Host4B3.com
Check Twitter.com/Host4B3 for updates if the site it down.

Help will be given to those with a b3.log

System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
Tags:
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal