Exemple #1
0
 def execute(self, bot, input):
     try:
         cit_name = int(input.group(2))
     except ValueError:
         cit_name = input.group(2)
     cit = Citizen(cit_name)
     cit.load()
     bot.say(cit.name + ': ' + cit.fightCalcStr())
     # Store citizen for future use
     ctzns = bot.db['citizens']
     if ctzns is None:
         ctzns = []
     if cit not in ctzns:
         ctzns.append(cit)
         bot.db['citizens'] = ctzns