mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-26 13:01:06 -05: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):
|
if user.checkPassword(password):
|
||||||
try:
|
try:
|
||||||
user.addAuth(msg.prefix)
|
user.addAuth(msg.prefix)
|
||||||
ircdb.users.setUser(user)
|
ircdb.users.setUser(user, flush=False)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
except ValueError:
|
except ValueError:
|
||||||
irc.error('Your secure flag is true and your hostmask '
|
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[hostmask]
|
||||||
del self._hostmaskCache[id]
|
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."""
|
"""Sets a user (given its id) to the IrcUser given it."""
|
||||||
self.nextId = max(self.nextId, user.id)
|
self.nextId = max(self.nextId, user.id)
|
||||||
try:
|
try:
|
||||||
@ -731,7 +731,8 @@ class UsersDictionary(utils.IterableMap):
|
|||||||
raise DuplicateHostmask, hostmask
|
raise DuplicateHostmask, hostmask
|
||||||
self.invalidateCache(user.id)
|
self.invalidateCache(user.id)
|
||||||
self.users[user.id] = user
|
self.users[user.id] = user
|
||||||
self.flush()
|
if flush:
|
||||||
|
self.flush()
|
||||||
|
|
||||||
def delUser(self, id):
|
def delUser(self, id):
|
||||||
"""Removes a user from the database."""
|
"""Removes a user from the database."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user