Commit e80eabd0 authored by gijs's avatar gijs

Fix to make it recover

parent eb987c4a
......@@ -54,16 +54,6 @@ class PlotBot(irc.bot.SingleServerIRCBot):
c.join(self.channel,)
print "Bot connected"
self.get_plotter()
def send(self, c, msg):
max_length = 350
if len(msg) <= max_length + 2:
c.privmsg(nick_plotbot, msg)
else:
c.privmsg(nick_plotbot, msg[0:max_length])
time.sleep(1)
self.send(c, msg[max_length:])
def answer(self, c, msg):
c.privmsg(self.channel, msg)
......@@ -160,7 +150,7 @@ class PlotBot(irc.bot.SingleServerIRCBot):
self.plotter.write('RO90')
self.set_margins()
return self.plotter
except IndexError:
except:
self.plotter = None
return False
......
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