courgette/big-brother-bot — Issue #29: BF3: !maprotate fails when waiting for players
Author: courgette
Created: 2011-10-29 23:26:49+00:00
State: open

When a map starts, we are waiting for more players to join to start the game.
If the `!maprotate` command is used we got an error back and the map is not changed.

log shows

```
111030 01:17:37	DEBUG	'AdminPlugin: OnSay handle 5:"!maprotate"'
111030 01:17:37	DEBUG	'AdminPlugin: Handle command !maprotate'
111030 01:17:37	VERBOSE	u"RCON :\t ('mapList.getMapIndices',)"
111030 01:17:37	VERBOSE	u"RCON response:\t ['3', '4']"
111030 01:17:37	VERBOSE	u"RCON :\t ('mapList.setNextMapIndex', '4')"
111030 01:17:37	VERBOSE	u'RCON response:\t []'
111030 01:17:37	VERBOSE	u"RCON :\t ('mapList.endRound', '1')"
111030 01:17:37	DEBUG	"getCommand: ('admin.say', '(b3): [pm] There was an error processing your command', 'squad', '1', '0')"
111030 01:17:37	VERBOSE	u"RCON :\t ('admin.say', '(b3): [pm] There was an error processing your command', 'squad', '1', '0')"
111030 01:17:37	ERROR	'handler AdminPlugin could not handle event Say: CommandFailedError: [\'UnableToEndRound\'] [(\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\parser.py\', 988, \'handleEvents\', \'hfunc.parseEvent(event)\'), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\plugin.py\', 158, \'parseEvent\', \'self.onEvent(event)\'), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\plugin.py\', 176, \'onEvent\', \'self.handle(event)\'), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\plugins\\\\admin.py\', 223, \'handle\', \'self.OnSay(event)\'), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\plugins\\\\admin.py\', 368, \'OnSay\', \'results = command.execute(data, event.client)\'), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\plugins\\\\admin.py\', 2004, \'execute\', \'self.func(data, client, copy.copy(self))\'), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\plugins\\\\admin.py\', 671, \'cmd_maprotate\', \'self.console.rotateMap()\'), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\parsers\\\\frostbite2\\\\abstractParser.py\', 848, \'rotateMap\', "self.write((\'mapList.endRound\', \'1\')) #TODO: can we declare the currently winning team here?"), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\parsers\\\\frostbite2\\\\abstractParser.py\', 273, \'write\', \'res = self.output.write(msg, maxRetries=maxRetries, needConfirmation=needConfirmation)\'), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\parsers\\\\frostbite2\\\\rcon.py\', 52, \'write\', \'response = self.frostbite_server.command(cmd)\'), (\'C:\\\\Users\\\\Thomas\\\\workspace-pycharm\\\\big-brother-bot\\\\b3\\\\parsers\\\\frostbite2\\\\protocol.py\', 322, \'command\', \'raise CommandFailedError(response)\')]'
111030 01:17:37	VERBOSE	'Parsing Event: Say: TelnetPlugin'
111030 01:17:38	CONSOLE	"['player.onChat', 'Server', '(b3): [pm] There was an error processing your command']"
111030 01:17:38	VERBOSE	u'RCON response:\t []'
111030 01:17:38	DEBUG	'looking for event handling method called : OnPlayerChat'
111030 01:17:38	DEBUG	"routing ----> OnPlayerChat(['Server', '(b3): [pm] There was an error processing your command'])"
```