Add option to devoice players during night
This commit is contained in:
parent
78465c9769
commit
d827eae2d8
@ -58,6 +58,7 @@ IDLE_STASIS_PENALTY = 1
|
||||
PART_STASIS_PENALTY = 1
|
||||
ACC_STASIS_PENALTY = 1
|
||||
QUIET_DEAD_PLAYERS = False
|
||||
DEVOICE_DURING_NIGHT = False
|
||||
QUIET_MODE = "q" # "q" or "b"
|
||||
QUIET_PREFIX = "" # "" or "~q:"
|
||||
# The bot will automatically toggle those modes of people joining
|
||||
|
@ -2884,7 +2884,7 @@ def del_player(cli, nick, forced_death = False, devoice = True, end_game = True,
|
||||
cli.msg(botconfig.CHANNEL, tmsg)
|
||||
debuglog(nick, "(mad scientist) KILL FAIL")
|
||||
|
||||
if devoice:
|
||||
if devoice and not var.DEVOICE_DURING_NIGHT:
|
||||
cmode.append(("-v", nick))
|
||||
if var.PHASE == "join":
|
||||
if nick in var.GAMEMODE_VOTES:
|
||||
@ -3579,6 +3579,12 @@ def begin_day(cli):
|
||||
t2.daemon = True
|
||||
t2.start()
|
||||
|
||||
if var.DEVOICE_DURING_NIGHT:
|
||||
modes = []
|
||||
for player in var.list_players():
|
||||
modes.append(("+v", player))
|
||||
mass_mode(cli, modes, [])
|
||||
|
||||
def night_warn(cli, gameid):
|
||||
if gameid != var.NIGHT_ID:
|
||||
return
|
||||
@ -5903,6 +5909,12 @@ def transition_night(cli):
|
||||
var.PHASE = "night"
|
||||
var.GAMEPHASE = "night"
|
||||
|
||||
if var.DEVOICE_DURING_NIGHT:
|
||||
modes = []
|
||||
for player in var.list_players():
|
||||
modes.append(("-v", player))
|
||||
mass_mode(cli, modes, [])
|
||||
|
||||
for x, tmr in var.TIMERS.items(): # cancel daytime timer
|
||||
tmr[0].cancel()
|
||||
var.TIMERS = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user