From f53058e5c7fec4bafdddd13a6a7c60d086d21fd8 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 3 Aug 2004 06:03:16 +0000 Subject: [PATCH] User configuration stuff can wait until later. --- src/User.py | 68 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/User.py b/src/User.py index edc24f5fd..e59881169 100755 --- a/src/User.py +++ b/src/User.py @@ -458,41 +458,41 @@ class User(callbacks.Privmsg): else: irc.error(conf.supybot.replies.incorrectAuthentication()) - def config(self, irc, msg, args): - """[--list] [] +## def config(self, irc, msg, args): +## """[--list] [] - Sets the user configuration variable to , if given. If - is not given, returns the current value of for the user - giving the command. If --list is given, lists the values in . - """ - try: - id = ircdb.users.getUserId(msg.prefix) - except KeyError: - irc.errorNoUser() - return - list = False - (optlist, args) = getopt.getopt(args, '', ['list']) - for (option, arg) in optlist: - if option == '--list': - list = True - if len(args) >= 2: - # We're setting. - pass - else: - # We're getting. - name = privmsgs.getArgs(args) - if not name.startswith('users.'): - name = 'users.' + name - try: - wrapper = Config.getWrapper(name) - wrapper = wrapper.get(str(id)) - except InvalidRegistryValue, e: - irc.error('%r is not a valid configuration variable.' % name) - return - if list: - pass - else: - irc.reply(str(wrapper)) +## Sets the user configuration variable to , if given. If +## is not given, returns the current value of for the user +## giving the command. If --list is given, lists the values in . +## """ +## try: +## id = ircdb.users.getUserId(msg.prefix) +## except KeyError: +## irc.errorNoUser() +## return +## list = False +## (optlist, args) = getopt.getopt(args, '', ['list']) +## for (option, arg) in optlist: +## if option == '--list': +## list = True +## if len(args) >= 2: +## # We're setting. +## pass +## else: +## # We're getting. +## name = privmsgs.getArgs(args) +## if not name.startswith('users.'): +## name = 'users.' + name +## try: +## wrapper = Config.getWrapper(name) +## wrapper = wrapper.get(str(id)) +## except InvalidRegistryValue, e: +## irc.error('%r is not a valid configuration variable.' % name) +## return +## if list: +## pass +## else: +## irc.reply(str(wrapper)) Class = User