Commit 03e19cbb authored by Mindiell's avatar Mindiell

Timer is now launched once IRC connection is made.

parent 995ad567
......@@ -39,8 +39,8 @@ class Wantzel(object):
reactor.connectTCP(config.server, config.port, self.irc)
self.test_timer = ""
# Loop call
self.loop_started = False
self.loop = task.LoopingCall(self.timer)
self.loop.start(config.timer)
def timer(self):
"""
......@@ -92,6 +92,10 @@ class Wantzel(object):
"""
Log.debug("UNKNOWN %s %s %s" % (prefix, command, params))
if command=="RPL_NAMREPLY":
# Launch loop if necessary
if not self.loop_started:
self.loop.start(config.timer)
self.loop_started = True
# Beg for operator mode ?
self.send_message(params[2], self.op.need_op_mode("@"+self.irc.client.nickname, params))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment