|
|
@ -306,8 +306,6 @@ def on_kicked(cli, nick, chan, victim, reason): |
|
|
|
if victim == botconfig.NICK: |
|
|
|
if victim == botconfig.NICK: |
|
|
|
cli.join(botconfig.CHANNEL) |
|
|
|
cli.join(botconfig.CHANNEL) |
|
|
|
cli.kick(chan, nick, "No.") |
|
|
|
cli.kick(chan, nick, "No.") |
|
|
|
else: |
|
|
|
|
|
|
|
print("WHAT", nick, chan, victim, reason) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@cmd("stats") |
|
|
|
@cmd("stats") |
|
|
@ -787,6 +785,7 @@ def begin_day(cli): |
|
|
|
var.DAY_ID = timetime() |
|
|
|
var.DAY_ID = timetime() |
|
|
|
t = threading.Timer(var.DAY_TIME_LIMIT, hurry_up, [cli, var.DAY_ID]) |
|
|
|
t = threading.Timer(var.DAY_TIME_LIMIT, hurry_up, [cli, var.DAY_ID]) |
|
|
|
var.TIMERS[1] = t |
|
|
|
var.TIMERS[1] = t |
|
|
|
|
|
|
|
var.TIMERS[1].daemon = True |
|
|
|
t.start() |
|
|
|
t.start() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -796,16 +795,10 @@ def transition_day(cli, gameid=0): |
|
|
|
if gameid != var.NIGHT_ID: |
|
|
|
if gameid != var.NIGHT_ID: |
|
|
|
return |
|
|
|
return |
|
|
|
var.NIGHT_ID = 0 |
|
|
|
var.NIGHT_ID = 0 |
|
|
|
print("Day is starting...") |
|
|
|
|
|
|
|
var.PHASE = "day" |
|
|
|
var.PHASE = "day" |
|
|
|
var.GOATED = False |
|
|
|
var.GOATED = False |
|
|
|
chan = botconfig.CHANNEL |
|
|
|
chan = botconfig.CHANNEL |
|
|
|
|
|
|
|
|
|
|
|
if var.DAY_TIME_LIMIT > 0: # Time limit enabled |
|
|
|
|
|
|
|
t = threading.Timer(var.DAY_TIME_LIMIT, hurry_up, [cli]) |
|
|
|
|
|
|
|
var.TIMERS[1] = t |
|
|
|
|
|
|
|
t.start() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Reset daytime variables |
|
|
|
# Reset daytime variables |
|
|
|
var.VOTES = {} |
|
|
|
var.VOTES = {} |
|
|
|
var.INVESTIGATED = [] |
|
|
|
var.INVESTIGATED = [] |
|
|
@ -1091,7 +1084,7 @@ def kill(cli, nick, rest): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pmcmd("guard") |
|
|
|
@pmcmd("guard") |
|
|
|
def kill(cli, nick, rest): |
|
|
|
def guard(cli, nick, rest): |
|
|
|
if var.PHASE in ("none", "join"): |
|
|
|
if var.PHASE in ("none", "join"): |
|
|
|
cli.notice(nick, "No game is currently running.") |
|
|
|
cli.notice(nick, "No game is currently running.") |
|
|
|
return |
|
|
|
return |
|
|
@ -1399,6 +1392,7 @@ def transition_night(cli): |
|
|
|
var.NIGHT_ID = timetime() |
|
|
|
var.NIGHT_ID = timetime() |
|
|
|
t = threading.Timer(var.NIGHT_TIME_LIMIT, transition_day, [cli, var.NIGHT_ID]) |
|
|
|
t = threading.Timer(var.NIGHT_TIME_LIMIT, transition_day, [cli, var.NIGHT_ID]) |
|
|
|
var.TIMERS[0] = t |
|
|
|
var.TIMERS[0] = t |
|
|
|
|
|
|
|
var.TIMERS[0].daemon = True |
|
|
|
t.start() |
|
|
|
t.start() |
|
|
|
|
|
|
|
|
|
|
|
# send PMs |
|
|
|
# send PMs |
|
|
@ -1755,4 +1749,11 @@ def help(cli, rnick, chan, rest): |
|
|
|
afns.append("\u0002"+name+"\u0002") |
|
|
|
afns.append("\u0002"+name+"\u0002") |
|
|
|
cli.notice(nick, "Commands: "+", ".join(fns)) |
|
|
|
cli.notice(nick, "Commands: "+", ".join(fns)) |
|
|
|
if afns: |
|
|
|
if afns: |
|
|
|
cli.notice(nick, "Admin Commands: "+", ".join(afns)) |
|
|
|
cli.notice(nick, "Admin Commands: "+", ".join(afns)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@hook("invite", raw_nick = False, admin_only = True) |
|
|
|
|
|
|
|
def on_invite(cli, nick, something, chan): |
|
|
|
|
|
|
|
cli.join(chan) |
|
|
|
|
|
|
|
|