fix bug where players in var.DISCONNECTED couldn't use any commands (like !stats)

This commit is contained in:
jacob1 2015-05-28 21:01:23 -04:00
parent d15fd90b1e
commit 338f24aa66
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ def generate(fdict, permissions=True, **kwargs):
if var.PHASE != "join" and not game:
largs[0].notice(nick, "Werewolf is already in play.")
return
if playing and nick not in var.list_players() or nick in var.DISCONNECTED.keys():
if playing and (nick not in var.list_players() or nick in var.DISCONNECTED.keys()):
largs[0].notice(nick, "You're not currently playing.")
return
if roles:

View File

@ -977,7 +977,7 @@ def init_db():
c.execute('CREATE TABLE IF NOT EXISTS allowed_accs (acc TEXT, command TEXT, UNIQUE(acc, command))') # ALLOW_ACCOUNTS
c.execute('CREATE TABLE IF NOT EXISTS pingif_prefs (user TEXT, is_account BOOLEAN, players INTEGER, PRIMARY KEY(user, is_account))') # pingif player count preferences
c.execute('CREATE INDEX IF NOT EXISTS ix_ping_prefs_pingif ON pingif_prefs (players ASC)')
c.execute('CREATE INDEX IF NOT EXISTS ix_ping_prefs_pingif ON pingif_prefs (players ASC)') # index apparently makes it faster
c.execute('PRAGMA table_info(pre_restart_state)')
try: