mirror of https://github.com/Shizmob/pydle.git
Unconditionally sync metadata, even on quitting or killing.
This commit is contained in:
parent
69c5d1d667
commit
c7e5384358
|
@ -389,16 +389,16 @@ class RFC1459Support(BasicClient):
|
|||
target, targetmeta = self._parse_user(message.params[0])
|
||||
reason = message.params[1]
|
||||
|
||||
self._sync_user(target, targetmeta)
|
||||
if by in self.users:
|
||||
self._sync_user(by, bymeta)
|
||||
|
||||
self.on_kill(target, by, reason)
|
||||
if self.is_same_nick(self.nickname, target):
|
||||
self.disconnect()
|
||||
else:
|
||||
self._destroy_user(target)
|
||||
|
||||
self.on_kill(target, by, reason)
|
||||
|
||||
def on_raw_mode(self, message):
|
||||
""" MODE command. """
|
||||
nick, metadata = self._parse_user(message.source)
|
||||
|
@ -466,13 +466,12 @@ class RFC1459Support(BasicClient):
|
|||
for channel in channels:
|
||||
if self.in_channel(channel):
|
||||
self._destroy_channel(channel)
|
||||
self.on_part(channel, nick, reason)
|
||||
else:
|
||||
# Someone else left. Remove them.
|
||||
for ch in channels:
|
||||
self._destroy_user(nick, ch)
|
||||
|
||||
for channel in channels:
|
||||
self.on_part(channel, nick, reason)
|
||||
for channel in channels:
|
||||
self._destroy_user(nick, channel)
|
||||
self.on_part(channel, nick, reason)
|
||||
|
||||
def on_raw_ping(self, message):
|
||||
""" PING command. """
|
||||
|
@ -494,8 +493,9 @@ class RFC1459Support(BasicClient):
|
|||
|
||||
def on_raw_quit(self, message):
|
||||
""" QUIT command. """
|
||||
# No need to sync if the user is quitting anyway.
|
||||
nick = self._parse_user(message.source)[0]
|
||||
nick, metadata = self._parse_user(message.source)
|
||||
|
||||
self._sync_user(nick, metadata)
|
||||
if message.params:
|
||||
reason = message.params[0]
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue