mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 09:29:24 +01:00
It should be possible to identify without flushing.
This commit is contained in:
parent
47a1912030
commit
5ce2baa2d2
@ -339,7 +339,7 @@ class User(callbacks.Plugin):
|
||||
if user.checkPassword(password):
|
||||
try:
|
||||
user.addAuth(msg.prefix)
|
||||
ircdb.users.setUser(user)
|
||||
ircdb.users.setUser(user, flush=False)
|
||||
irc.replySuccess()
|
||||
except ValueError:
|
||||
irc.error('Your secure flag is true and your hostmask '
|
||||
|
@ -707,7 +707,7 @@ class UsersDictionary(utils.IterableMap):
|
||||
del self._hostmaskCache[hostmask]
|
||||
del self._hostmaskCache[id]
|
||||
|
||||
def setUser(self, user):
|
||||
def setUser(self, user, flush=True):
|
||||
"""Sets a user (given its id) to the IrcUser given it."""
|
||||
self.nextId = max(self.nextId, user.id)
|
||||
try:
|
||||
@ -731,7 +731,8 @@ class UsersDictionary(utils.IterableMap):
|
||||
raise DuplicateHostmask, hostmask
|
||||
self.invalidateCache(user.id)
|
||||
self.users[user.id] = user
|
||||
self.flush()
|
||||
if flush:
|
||||
self.flush()
|
||||
|
||||
def delUser(self, id):
|
||||
"""Removes a user from the database."""
|
||||
|
Loading…
Reference in New Issue
Block a user