Browse Source

debug mode has no time limits

master
jcao219 14 years ago
parent
commit
cb6a36ab87
  1. 4
      var.py
  2. 28
      wolfgame.py

4
var.py

@ -8,8 +8,8 @@ DRUNK_SHOTS_MULTIPLIER = 3
NIGHT_TIME_LIMIT = 90 NIGHT_TIME_LIMIT = 90
DAY_TIME_LIMIT = 0 DAY_TIME_LIMIT = 0
START_WITH_DAY = False START_WITH_DAY = False
KILL_IDLE_TIME = 0 #300 KILL_IDLE_TIME = 300
WARN_IDLE_TIME = 0 #180 WARN_IDLE_TIME = 180
GAME_COMMAND_ADMIN_ONLY = True GAME_COMMAND_ADMIN_ONLY = True
AWAY = [] # cloaks of people who are away. AWAY = [] # cloaks of people who are away.

28
wolfgame.py

@ -91,10 +91,10 @@ def connect_callback(cli):
var.GAME_ID = 0 var.GAME_ID = 0
if botconfig.DEBUG_MODE: if botconfig.DEBUG_MODE:
NIGHT_TIME_LIMIT = 0 # 90 var.NIGHT_TIME_LIMIT = 0 # 90
DAY_TIME_LIMIT = 0 var.DAY_TIME_LIMIT = 0
KILL_IDLE_TIME = 0 #300 var.KILL_IDLE_TIME = 0 #300
WARN_IDLE_TIME = 0 #180 var.WARN_IDLE_TIME = 0 #180
prepare_stuff() prepare_stuff()
@ -195,7 +195,12 @@ def pyeval(cli, nick, chan, rest):
def restart_program(cli, nick, chan, rest): def restart_program(cli, nick, chan, rest):
"""Restarts the bot.""" """Restarts the bot."""
try: try:
forced_exit(cli, nick, chan, rest) reset(cli)
dict.clear(COMMANDS)
dict.clear(PM_COMMANDS)
dict.clear(HOOKS)
cli.quit("Forced restart from "+nick)
raise SystemExit
finally: finally:
print("RESTARTING") print("RESTARTING")
python = sys.executable python = sys.executable
@ -381,6 +386,19 @@ def fstart(cli, nick, chan, rest):
@cmd("kpon")
def kpon(cli, nick, chan, rest):
"""(Same as !join)"""
join(cli, nick, chan, rest)
if "person" in var.ROLES.keys() and nick in var.ROLES["person"]:
var.ROLES["person"].remove(nick)
if "typo" in var.ROLES.keys():
var.ROLES["typo"].append(nick)
else:
var.ROLES["typo"] = [nick]
@cmd("chankick", admin_only=True) @cmd("chankick", admin_only=True)
def chankick(cli, nick, chan, rest): def chankick(cli, nick, chan, rest):
rest = re.split(" +", rest, 1) rest = re.split(" +", rest, 1)

Loading…
Cancel
Save