From ad21468aec5a8cfe10a359053cc858c253f1c814 Mon Sep 17 00:00:00 2001 From: Andrea Corbellini Date: Sun, 8 May 2011 18:27:51 +0200 Subject: [PATCH 1/2] When a user tries to speak with the bot, reply to him, so the message doesn't get lost. --- Encyclopedia/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Encyclopedia/plugin.py b/Encyclopedia/plugin.py index b7d065a..c64ffc8 100644 --- a/Encyclopedia/plugin.py +++ b/Encyclopedia/plugin.py @@ -503,7 +503,7 @@ class Encyclopedia(callbacks.Plugin): or channel in self.registryValue('editchannel') \ and capab(msg.prefix, 'restricted-editor')): if len(text[:text.find('is')]) > 15: - irc.error("I am only a bot, please don't think I'm intelligent :)") + irc.reply("I am only a bot, please don't think I'm intelligent :)") else: irc.reply("Your edit request has been forwarded to %s. Thank you for your attention to detail" % self.registryValue('relaychannel',channel),private=True) @@ -520,7 +520,7 @@ class Encyclopedia(callbacks.Plugin): if not ret: if len(text) > 15: - irc.error("I am only a bot, please don't think I'm intelligent :)") + irc.reply("I am only a bot, please don't think I'm intelligent :)") return retmsg = '' ret = self.registryValue('notfoundmsg') From a6f91c2dad6fe9c4dfb252d70b7f94db2ea9c7d9 Mon Sep 17 00:00:00 2001 From: Andrea Corbellini Date: Mon, 9 May 2011 14:20:39 +0200 Subject: [PATCH 2/2] Pass prefixNick=True. --- Encyclopedia/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Encyclopedia/plugin.py b/Encyclopedia/plugin.py index c64ffc8..e0c7d8a 100644 --- a/Encyclopedia/plugin.py +++ b/Encyclopedia/plugin.py @@ -503,7 +503,7 @@ class Encyclopedia(callbacks.Plugin): or channel in self.registryValue('editchannel') \ and capab(msg.prefix, 'restricted-editor')): if len(text[:text.find('is')]) > 15: - irc.reply("I am only a bot, please don't think I'm intelligent :)") + irc.reply("I am only a bot, please don't think I'm intelligent :)", prefixNick=True) else: irc.reply("Your edit request has been forwarded to %s. Thank you for your attention to detail" % self.registryValue('relaychannel',channel),private=True) @@ -520,7 +520,7 @@ class Encyclopedia(callbacks.Plugin): if not ret: if len(text) > 15: - irc.reply("I am only a bot, please don't think I'm intelligent :)") + irc.reply("I am only a bot, please don't think I'm intelligent :)", prefixNick=True) return retmsg = '' ret = self.registryValue('notfoundmsg')