From c6dddc21c5b3b764aa2196d30ef37ab1ae2dd8b6 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Thu, 4 Aug 2011 19:42:55 -0500 Subject: [PATCH] now whether the bot joins immediately on connect, or after being cloaked is configurable --- wolfgame.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wolfgame.py b/wolfgame.py index cd9d61d..a0c51a2 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -38,7 +38,6 @@ hook = decorators.generate(HOOKS, raw_nick=True) def connect_callback(cli): cli.ns_identify(botconfig.PASS) - @hook("event_hosthidden", id=294) def prepare_stuff(*args): cli.join(botconfig.CHANNEL) cli.msg("ChanServ", "op "+botconfig.CHANNEL) @@ -59,6 +58,9 @@ def connect_callback(cli): cli.who(botconfig.CHANNEL) + if botconfig.JOIN_AFTER_CLOAKED: + prepare_stuff = hook("event_hosthidden", id=294)(prepare_stuff) + @hook("nicknameinuse") def mustghost(cli, *blah): @@ -102,6 +104,9 @@ def connect_callback(cli): var.DAY_TIME_LIMIT = 0 var.KILL_IDLE_TIME = 0 #300 var.WARN_IDLE_TIME = 0 #180 + + if not botconfig.JOIN_AFTER_CLOAKED: # join immediately + prepare_stuff(cli)