From fa2f3eef0f2750fe637d71ea59ec9f8d89f692d2 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Sat, 1 Sep 2012 16:58:05 +0200 Subject: [PATCH] Use supybot default success and error messages --- plugin.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/plugin.py b/plugin.py index ce5e8c6..ecb5799 100644 --- a/plugin.py +++ b/plugin.py @@ -318,11 +318,10 @@ class DuckHunt(callbacks.Plugin): self.channelscores[channel][nickto] += self.channelscores[channel][nickfrom] del self.channelscores[channel][nickfrom] self._write_scores(channel) - #TODO: Reply with the config success message - irc.reply("Okay!") + irc.replySuccess() except: - irc.error("Something went wrong") + irc.replyError() else: @@ -353,10 +352,10 @@ class DuckHunt(callbacks.Plugin): self._write_scores(channel) - irc.reply("Okay!") + irc.replySuccess() except: - irc.error("Something went wrong") + irc.replyError() else: @@ -375,7 +374,7 @@ class DuckHunt(callbacks.Plugin): self._read_scores(channel) del self.channeltimes[channel][nick] self._write_scores(channel) - irc.reply("Okay!") + irc.replySuccess() else: irc.error('Are you sure ' + str(channel) + ' is a channel?') @@ -393,10 +392,10 @@ class DuckHunt(callbacks.Plugin): self._read_scores(channel) del self.channelscores[channel][nick] self._write_scores(channel) - irc.reply("Okay!") + irc.replySuccess() except: - irc.error("Something went wrong") + irc.replyError() else: irc.error('Are you sure this is a channel?')