fixed some bugs and made !flastgame better

This commit is contained in:
Jimmy Cao 2011-08-01 22:42:06 -05:00
parent 2be2bb98e2
commit b468d97db8
2 changed files with 4 additions and 4 deletions

4
var.py
View File

@ -172,7 +172,7 @@ def remove_away(clk):
def add_away(clk):
with conn:
c.execute('INSERT into away values (?)', (clk,))
c.execute('INSERT into away VALUES (?)', (clk,))
def update_role_stats(clk, role, won, iwon):
role = role.replace(" ", "_")+'stats'
@ -192,7 +192,7 @@ def update_role_stats(clk, role, won, iwon):
totalgames += 1
c.execute(('INSERT OR REPLACE INTO {0} (cloak, teamwins, individualwins, total) '+
'values (?,?,?,?)').format(role), (clk, wins, iwins, totalgames))
'VALUES (?,?,?,?)').format(role), (clk, wins, iwins, totalgames))

View File

@ -1975,9 +1975,9 @@ def flastgame(cli, nick, *rest):
chan = botconfig.CHANNEL
if "join" in COMMANDS.keys():
del COMMANDS["join"]
COMMANDS["join"] = [lambda *spam: cli.msg(chan, "This command has been disabled by an admin.")]
if "start" in COMMANDS.keys():
del COMMANDS["start"]
COMMANDS["start"] = [lambda *spam: cli.msg(chan, "This command has been disabled by an admin.")]
cli.msg(chan, "Starting a new game has now been disabled by \02{0}\02.".format(nick))