This commit is contained in:
James Scott 2012-12-13 20:52:19 -05:00
parent bd4d0f1bda
commit 4df02ab5f7
1 changed files with 4 additions and 3 deletions

View File

@ -106,12 +106,13 @@ class Cah(callbacks.Plugin):
def startgame(self, irc, msg, args):
channel = ircutils.toLower(msg.args[0])
try:
if self.games[channel]['canStart']:
if len(self.players) < 2:
game = self.games[channel]
if game['canStart']:
if len(game['players']) < 2:
irc.reply("I need more players.")
else:
self.games[channel]['canStart'] = False
self.games[channel]['game'] = Game(self.players, self.games[channel]['rounds'])
self.games[channel]['game'] = Game(game['players'], game['rounds'])
#start game logic
self.nextround()