aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2014-01-14 00:02:17 +0100
committerlassulus <lassulus@googlemail.com>2014-01-14 00:02:17 +0100
commite4657352b4ed70174136544f348c331f05371f41 (patch)
treeb2da5bbbc661e212d8f166309ae3332f0ad2e994
parentf0dd2f5069384e1d67bf54db526996928ebf1a0c (diff)
reaktor: reflect changes of api in reaktor code
-rw-r--r--IRC/ircasy.py4
-rw-r--r--IRC/reaktor.py3
2 files changed, 3 insertions, 4 deletions
diff --git a/IRC/ircasy.py b/IRC/ircasy.py
index 3d211ac..6b478de 100644
--- a/IRC/ircasy.py
+++ b/IRC/ircasy.py
@@ -18,7 +18,7 @@ import logging,logging.handlers
class asybot(asychat):
- def __init__(self, server, port, channels, nickname, realname=False, username=False, hostname=False, hammer_interval=10, alarm_timeout=300, kill_timeout=360):
+ def __init__(self, server, port, nickname, channels, realname=False, username=False, hostname=False, hammer_interval=10, alarm_timeout=300, kill_timeout=360, loglevel=logging.ERROR):
asychat.__init__(self)
#logger magic
self.log = logging.getLogger('asybot')
@@ -26,7 +26,7 @@ class asybot(asychat):
formatter = logging.Formatter( '%(filename)s: %(levelname)s: %(message)s')
hdlr.setFormatter(formatter)
self.log.addHandler(hdlr)
- logging.basicConfig(level = logging.DEBUG)
+ logging.basicConfig(level = loglevel)
self.nickname = nickname
diff --git a/IRC/reaktor.py b/IRC/reaktor.py
index 706d2c8..990d47e 100644
--- a/IRC/reaktor.py
+++ b/IRC/reaktor.py
@@ -20,8 +20,7 @@ logging.basicConfig(level = logging.DEBUG if getconf('debug') else logging.INFO)
class Reaktor(asybot):
def __init__(self):
- nick = getconf('irc_nickname')
- asybot.__init__(self, getconf('irc_server'), getconf('irc_port'), getconf('irc_channels'), nick, nick, nick, nick, nick, getconf('irc_hammer_interval'), getconf('irc_alarm_timeout'), getconf('irc_kill_timeout'))
+ asybot.__init__(self, getconf('irc_server'), getconf('irc_port'), getconf('irc_nickname'), getconf('irc_channels'), hammer_interval=getconf('irc_hammer_interval'), alarm_timeout=getconf('irc_alarm_timeout'), kill_timeout=getconf('irc_kill_timeout'))
def on_privmsg(self, prefix, command, params, rest):
for command in getconf('commands'):