Updated to use generic command name and to require privilege for licensekey.

This commit is contained in:
Jeremy Fincher 2003-10-21 06:35:15 +00:00
parent aee6579dc1
commit e767feb20b
1 changed files with 5 additions and 4 deletions

View File

@ -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("""
<jemfinch> @list Amazon
<supybot> amazonlicensekey, isbn
<jemfinch> (amazonlicense key is used to set the license key to access Amazon's web services. We won't show that here, for obvious reasons.)
<supybot> licensekey, isbn
<jemfinch> (licensekey is used to set the license key to access Amazon's web services. We won't show that here, for obvious reasons.)
<jemfinch> @isbn 0-8050-3906-6
<supybot> "Winning With the French (Openings)", written by Wolfgang Uhlmann; published by Henry Holt & Company, Inc..
<jemfinch> @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):
"""<key>
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):
"""<isbn>