flastgame now pings the admin who did it after the game ends.
This commit is contained in:
parent
3acd087774
commit
5a110cb104
@ -86,6 +86,7 @@ def connect_callback(cli):
|
||||
var.ROLES = {"person" : []}
|
||||
var.ORIGINAL_ROLES = {}
|
||||
var.DEAD_USERS = {}
|
||||
var.ADMIN_TO_PING = None
|
||||
var.PHASE = "none" # "join", "day", or "night"
|
||||
var.TIMERS = [None, None]
|
||||
var.DEAD = []
|
||||
@ -672,6 +673,10 @@ def stop_game(cli, winner = ""):
|
||||
|
||||
var.update_role_stats(clk, rol, won, iwon)
|
||||
|
||||
if var.ADMIN_TO_PING:
|
||||
cli.msg(chan, "PING! " + var.ADMIN_TO_PING)
|
||||
var.ADMIN_TO_PING = None
|
||||
|
||||
reset(cli)
|
||||
return True
|
||||
|
||||
@ -895,6 +900,9 @@ def on_nick(cli, prefix, nick):
|
||||
var.USERS.append(nick)
|
||||
var.CLOAKS.append(cloak)
|
||||
|
||||
if prefix == var.ADMIN_TO_PING:
|
||||
var.ADMIN_TO_PING = nick
|
||||
|
||||
for k,v in var.ORIGINAL_ROLES.items():
|
||||
if prefix in v:
|
||||
var.ORIGINAL_ROLES[k].remove(prefix)
|
||||
@ -2188,6 +2196,7 @@ def flastgame(cli, nick, *rest):
|
||||
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))
|
||||
var.ADMIN_TO_PING = nick
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user