From e767feb20ba570a4f80af47c68d07a242f016e60 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 21 Oct 2003 06:35:15 +0000 Subject: [PATCH] Updated to use generic command name and to require privilege for licensekey. --- plugins/Amazon.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/Amazon.py b/plugins/Amazon.py index 535348dd7..7daec85d8 100644 --- a/plugins/Amazon.py +++ b/plugins/Amazon.py @@ -54,7 +54,7 @@ def configure(onStart, afterConnect, advanced): key = anything('What is it?') onStart.append('load Amazon') - onStart.append('amazonlicensekey %s' % key) + onStart.append('amazon licensekey %s' % key) else: print 'You\'ll need to get a key before you can use this plugin.' print 'You can apply for a key at http://www.amazon.com/webservices' @@ -62,8 +62,8 @@ def configure(onStart, afterConnect, advanced): example = utils.wrapLines(""" @list Amazon - amazonlicensekey, isbn - (amazonlicense key is used to set the license key to access Amazon's web services. We won't show that here, for obvious reasons.) + licensekey, isbn + (licensekey is used to set the license key to access Amazon's web services. We won't show that here, for obvious reasons.) @isbn 0-8050-3906-6 "Winning With the French (Openings)", written by Wolfgang Uhlmann; published by Henry Holt & Company, Inc.. @isbn 0805039066 @@ -72,7 +72,7 @@ example = utils.wrapLines(""" class Amazon(callbacks.Privmsg): threaded = True - def amazonlicensekey(self, irc, msg, args): + def licensekey(self, irc, msg, args): """ Sets the license key for using Amazon Web Services. Must be set before @@ -81,6 +81,7 @@ class Amazon(callbacks.Privmsg): key = privmsgs.getArgs(args) amazon.setLicense(key) irc.reply(msg, conf.replySuccess) + licensekey = privmsgs.checkCapability(licensekey, 'admin') def isbn(self, irc, msg, args): """