From 1bb3f2aefb7050c462bbd9093fa889010c28c823 Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Tue, 9 Apr 2013 19:25:08 -0400 Subject: [PATCH] Small cleanup --- wolfbot.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/wolfbot.py b/wolfbot.py index f7a993c..d007763 100755 --- a/wolfbot.py +++ b/wolfbot.py @@ -17,10 +17,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. - - from oyoyo.client import IRCClient -from oyoyo.parse import parse_nick import logging import botconfig import time @@ -28,9 +25,11 @@ import traceback import modules.common import sys + class UTCFormatter(logging.Formatter): converter = time.gmtime + def main(): if botconfig.DEBUG_MODE: logging.basicConfig(level=logging.DEBUG) @@ -48,12 +47,12 @@ def main(): formatter = UTCFormatter('[%(asctime)s] %(message)s', '%d/%b/%Y %H:%M:%S') for handler in logger.handlers: handler.setFormatter(formatter) - + cli = IRCClient( - {"privmsg":modules.common.on_privmsg, - "notice":lambda a, b, c, d: modules.common.on_privmsg(a, b, c, d, True), - "":modules.common.__unhandled__}, - host=botconfig.HOST, + {"privmsg": modules.common.on_privmsg, + "notice": lambda a, b, c, d: modules.common.on_privmsg(a, b, c, d, True), + "": modules.common.__unhandled__}, + host=botconfig.HOST, port=botconfig.PORT, authname=botconfig.USERNAME, password=botconfig.PASS, @@ -61,7 +60,7 @@ def main(): sasl_auth=botconfig.SASL_AUTHENTICATION, use_ssl=botconfig.USE_SSL, connect_cb=modules.common.connect_callback - ) + ) cli.mainLoop()