diff --git a/contrib/boobot.py b/contrib/boobot.py index 0325c52b..a198390a 100755 --- a/contrib/boobot.py +++ b/contrib/boobot.py @@ -104,7 +104,8 @@ class BoobotBrowser(StandardBrowser): encoding = EncodingFinder('windows-1252').encoding(r).lower().replace('iso-8859-1', 'windows-1252') h = self.get_document(r, parser='lxml', encoding=encoding) for title in h.xpath('//head/title'): - title = to_unicode(title.text_content()) + title = to_unicode(title.text_content()).strip() + title = ' '.join(title.splitlines()) return content_type, hsize, title def human_size(self, size): @@ -194,7 +195,8 @@ class Boobot(SingleServerIRCBot): self.joined[channel].set() def send_message(self, msg, channel=None): - self.connection.privmsg(channel or self.mainchannel, msg) + for m in msg.splitlines(): + self.connection.privmsg(channel or self.mainchannel, m) def on_pubmsg(self, c, event): # irclib 5.0 compatibility