Unconditionally sync metadata, even on quitting or killing.

This commit is contained in:
Shiz 2014-02-09 09:32:21 +01:00
parent 69c5d1d667
commit c7e5384358
1 changed files with 9 additions and 9 deletions

View File

@ -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,12 +466,11 @@ 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._destroy_user(nick, channel)
self.on_part(channel, nick, reason)
def on_raw_ping(self, message):
@ -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: