fix bug where players in var.DISCONNECTED couldn't use any commands (like !stats)
This commit is contained in:
parent
d15fd90b1e
commit
338f24aa66
@ -72,7 +72,7 @@ def generate(fdict, permissions=True, **kwargs):
|
|||||||
if var.PHASE != "join" and not game:
|
if var.PHASE != "join" and not game:
|
||||||
largs[0].notice(nick, "Werewolf is already in play.")
|
largs[0].notice(nick, "Werewolf is already in play.")
|
||||||
return
|
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.")
|
largs[0].notice(nick, "You're not currently playing.")
|
||||||
return
|
return
|
||||||
if roles:
|
if roles:
|
||||||
|
@ -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 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 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)')
|
c.execute('PRAGMA table_info(pre_restart_state)')
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user