diff --git a/CtcpNext/plugin.py b/CtcpNext/plugin.py index 17c23b1..b7c382a 100644 --- a/CtcpNext/plugin.py +++ b/CtcpNext/plugin.py @@ -110,9 +110,9 @@ class CtcpNext(callbacks.PluginRegexp): payload, msg.prefix) def set(self, irc, msg, args, ctcp, response): - """ + """ - Sets the response for to . Exceptions include + Sets the response for to . Exceptions include ACTION and PING, which are handled accordingly. All the standard substitutes ($version, $now, $nick, etc.) are handled properly. """ @@ -125,19 +125,31 @@ class CtcpNext(callbacks.PluginRegexp): set = wrap(set, ['admin', 'somethingWithoutSpaces', 'text']) def unset(self, irc, msg, args, ctcp): - """ + """ - Unsets the response for . + Unsets the response for . """ ctcp = ctcp.upper() try: del self.db[ctcp] except KeyError: - irc.error("No such CTCP '%s' exists." % ctcp, Raise=True) + irc.error("No response is set for CTCP '%s'." % ctcp, Raise=True) else: irc.replySuccess() unset = wrap(unset, ['admin', 'somethingWithoutSpaces']) + def show(self, irc, msg, args, ctcp): + """ + + Shows the configured response for , if it exists. + """ + ctcp = ctcp.upper() + try: + irc.reply(self.db[ctcp]) + except KeyError: + irc.error("No response is set for CTCP '%s'." % ctcp, Raise=True) + show = wrap(show, ['somethingWithoutSpaces']) + def list(self, irc, msg, args): """takes no arguments.