diff --git a/dr_botzo/ircbot/ircplugins/ircmgmt.py b/dr_botzo/ircbot/ircplugins/ircmgmt.py index 7c7bbf6..03baa46 100644 --- a/dr_botzo/ircbot/ircplugins/ircmgmt.py +++ b/dr_botzo/ircbot/ircplugins/ircmgmt.py @@ -56,7 +56,8 @@ class ChannelManagement(Plugin): chan_mod, c = IrcChannel.objects.get_or_create(name=channel) log.debug(u"joining channel %s", channel) self.connection.join(channel) - self.bot.reply(event, "Joined channel {0:s}.".format(channel)) + + return self.bot.reply(event, "Joined channel {0:s}.".format(channel)) def handle_part(self, connection, event, match): """Handle the join command.""" @@ -69,7 +70,8 @@ class ChannelManagement(Plugin): chan_mod, c = IrcChannel.objects.get_or_create(name=channel) log.debug(u"parting channel %s", channel) self.connection.part(channel) - self.bot.reply(event, "Parted channel {0:s}.".format(channel)) + + return self.bot.reply(event, "Parted channel {0:s}.".format(channel)) def handle_quit(self, connection, event, match): """Handle the join command.""" diff --git a/dr_botzo/markov/ircplugin.py b/dr_botzo/markov/ircplugin.py index e439a2e..2afe9b7 100644 --- a/dr_botzo/markov/ircplugin.py +++ b/dr_botzo/markov/ircplugin.py @@ -55,18 +55,18 @@ class Markov(Plugin): # the speaker topics = [x for x in addressed_re.match(what).group(1).split(' ') if len(x) >= 3] - self.bot.reply(event, u"{0:s}: {1:s}" - u"".format(nick, u" ".join(markovlib.generate_line(context, - topics=topics, - max_sentences=1)))) + return self.bot.reply(event, u"{0:s}: {1:s}" + u"".format(nick, u" ".join(markovlib.generate_line(context, + topics=topics, + max_sentences=1)))) else: # i wasn't addressed directly, so just respond topics = [x for x in what.split(' ') if len(x) >= 3] - self.bot.reply(event, u"{0:s}" - u"".format(u" ".join(markovlib.generate_line(context, - topics=topics, - max_sentences=1)))) + return self.bot.reply(event, u"{0:s}" + u"".format(u" ".join(markovlib.generate_line(context, + topics=topics, + max_sentences=1)))) plugin = Markov