summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsand <daniel@spatof.org>2013-05-11 19:43:20 (GMT)
committer sand <daniel@spatof.org>2013-05-11 19:43:20 (GMT)
commitf8c1e514e64e7aa0d94a861088713639d455586a (patch)
tree7ad42303443cdd06ab163ff023ff8cb6a2fd8fee
parentd575a592e71bcdb6ff78b013bf8a8ee782522122 (diff)
fix network e nickserv
-rw-r--r--pinolo/bot.py1
-rw-r--r--pinolo/irc.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/pinolo/bot.py b/pinolo/bot.py
index 26b0003..0c707fa 100644
--- a/pinolo/bot.py
+++ b/pinolo/bot.py
@@ -145,6 +145,7 @@ class Bot(SignalDispatcher):
# XXX should be empty the out buffer?
if not conn_obj.connected:
log.error("Trying to write to a non connected socket!")
+ conn_obj.out_buffer = ""
continue
while len(conn_obj.out_buffer):
diff --git a/pinolo/irc.py b/pinolo/irc.py
index 7755a0e..c7f8d3e 100644
--- a/pinolo/irc.py
+++ b/pinolo/irc.py
@@ -353,9 +353,14 @@ class IRCConnection(object):
def nickserv_login(self):
self.msg("NickServ", u"IDENTIFY %s" % self.config['nickserv'])
+ # XXX ugly
+ time.sleep(1)
# IRC EVENTS
def on_001(self, event):
+ if 'nickserv' in self.config:
+ self.nickserv_login()
+
self.join_all()
def on_433(self, event):