Added supybot.databases.users.hash.

This commit is contained in:
Jeremy Fincher 2004-04-05 09:23:40 +00:00
parent ee6ec32e01
commit a4b4c2101c
3 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
* Added supybot.databases.users.hash, allowing those running bots
to specify the default hashed/unhashed state of user passwords in
the config file.
* Added Debian.bug, which retrieve bug info from Debian's BTS.
* Changed Relay.names to Relay.nicks, to be consistent with

View File

@ -454,6 +454,9 @@ supybot.databases.users.register('timeoutIdentification',
registry.Integer(0, """Determines how long it takes identification to time
out. If the value is less than or equal to zero, identification never
times out."""))
supybot.databases.users.register('hash', registry.Boolean(False, """
Determines whether the passwords in the user database will be hashed by
default."""))
supybot.databases.register('ignores')
supybot.databases.ignores.register('filename', registry.String('ignores.conf',

View File

@ -705,7 +705,8 @@ class UsersDictionary(utils.IterableMap):
def newUser(self):
"""Allocates a new user in the database and returns it and its id."""
user = IrcUser()
hashed = conf.supybot.databases.users.hash()
user = IrcUser(hashed=hashed)
self.nextId += 1
id = self.nextId
self.users[id] = user