Changed the help for register and removed the --hashed option.

This commit is contained in:
Jeremy Fincher 2004-12-18 21:07:37 +00:00
parent 3e10b627c0
commit b421c07671

View File

@ -95,19 +95,17 @@ class User(callbacks.Privmsg):
additional('glob')]) additional('glob')])
def register(self, irc, msg, args, optlist, name, password): def register(self, irc, msg, args, optlist, name, password):
"""[--hashed] <name> <password> """<name> <password>
Registers <name> with the given password <password> and the current Registers <name> with the given password <password> and the current
hostmask of the person registering. This command (and all other hostmask of the person registering. You shouldn't register twice; if
commands that include a password) must be sent to the bot privately, you're not recognized as a user but you've already registered, use the
not in a channel. If --hashed is given, the password will be hashed addhostmask command to add another hostmask to your already-registered
on disk, rather than being stored in the default configured format. user, or use the identify command to identify just for a session.
This command (and all other commands that include a password) must be
sent to the bot privately, not in a channel.
""" """
addHostmask = True addHostmask = True
hashed = conf.supybot.databases.users.hash()
for (option, arg) in optlist:
if option == 'hashed':
hashed = True
try: try:
ircdb.users.getUserId(name) ircdb.users.getUserId(name)
irc.error('That name is already assigned to someone.', Raise=True) irc.error('That name is already assigned to someone.', Raise=True)
@ -132,8 +130,7 @@ class User(callbacks.Privmsg):
user.addHostmask(msg.prefix) user.addHostmask(msg.prefix)
ircdb.users.setUser(user) ircdb.users.setUser(user)
irc.replySuccess() irc.replySuccess()
register = wrap(register, ['private', getopts({'hashed':''}), 'something', register = wrap(register, ['private', 'something', 'something'])
'something'])
def unregister(self, irc, msg, args, user, password): def unregister(self, irc, msg, args, user, password):
"""<name> [<password>] """<name> [<password>]