From 481ab0216f9d877b8cb8bd70e8d0d024d0d86b7d Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 18 Dec 2013 23:08:07 +0100 Subject: Reaktor: irc_commands -> commands --- IRC/asybot.py | 4 ++-- IRC/getconf.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'IRC') diff --git a/IRC/asybot.py b/IRC/asybot.py index 38f0df1..0ac7a27 100755 --- a/IRC/asybot.py +++ b/IRC/asybot.py @@ -20,7 +20,7 @@ from re import split, search, match from textwrap import TextWrapper import logging,logging.handlers -config_filename = 'config.py' +config_filename = './config.py' from getconf import make_getconf getconf = make_getconf(config_filename) @@ -129,7 +129,7 @@ class asybot(asychat): def ME(text): PRIVMSG(('ACTION ' + text + '').encode(encoding='UTF-8')) - for command in getconf('irc_commands'): + for command in getconf('commands'): y = match(command['pattern'], rest) if y: self.execute_command(command, y, prefix, PRIVMSG, ME) diff --git a/IRC/getconf.py b/IRC/getconf.py index d6e9f42..f9cd440 100644 --- a/IRC/getconf.py +++ b/IRC/getconf.py @@ -8,12 +8,12 @@ import os def make_getconf(filename): - config = load_config(filename) def getconf(prop): prop_split = prop.split('.') string = '' - imp.reload(config) + config = load_config(filename) + #imp.reload(config) tmp = config.__dict__ for pr in prop_split: tmp = tmp[pr] -- cgit v1.2.3