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])
|
target, targetmeta = self._parse_user(message.params[0])
|
||||||
reason = message.params[1]
|
reason = message.params[1]
|
||||||
|
|
||||||
|
self._sync_user(target, targetmeta)
|
||||||
if by in self.users:
|
if by in self.users:
|
||||||
self._sync_user(by, bymeta)
|
self._sync_user(by, bymeta)
|
||||||
|
|
||||||
|
self.on_kill(target, by, reason)
|
||||||
if self.is_same_nick(self.nickname, target):
|
if self.is_same_nick(self.nickname, target):
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
else:
|
else:
|
||||||
self._destroy_user(target)
|
self._destroy_user(target)
|
||||||
|
|
||||||
self.on_kill(target, by, reason)
|
|
||||||
|
|
||||||
def on_raw_mode(self, message):
|
def on_raw_mode(self, message):
|
||||||
""" MODE command. """
|
""" MODE command. """
|
||||||
nick, metadata = self._parse_user(message.source)
|
nick, metadata = self._parse_user(message.source)
|
||||||
|
@ -466,13 +466,12 @@ class RFC1459Support(BasicClient):
|
||||||
for channel in channels:
|
for channel in channels:
|
||||||
if self.in_channel(channel):
|
if self.in_channel(channel):
|
||||||
self._destroy_channel(channel)
|
self._destroy_channel(channel)
|
||||||
|
self.on_part(channel, nick, reason)
|
||||||
else:
|
else:
|
||||||
# Someone else left. Remove them.
|
# Someone else left. Remove them.
|
||||||
for ch in channels:
|
for channel in channels:
|
||||||
self._destroy_user(nick, ch)
|
self._destroy_user(nick, channel)
|
||||||
|
self.on_part(channel, nick, reason)
|
||||||
for channel in channels:
|
|
||||||
self.on_part(channel, nick, reason)
|
|
||||||
|
|
||||||
def on_raw_ping(self, message):
|
def on_raw_ping(self, message):
|
||||||
""" PING command. """
|
""" PING command. """
|
||||||
|
@ -494,8 +493,9 @@ class RFC1459Support(BasicClient):
|
||||||
|
|
||||||
def on_raw_quit(self, message):
|
def on_raw_quit(self, message):
|
||||||
""" QUIT command. """
|
""" QUIT command. """
|
||||||
# No need to sync if the user is quitting anyway.
|
nick, metadata = self._parse_user(message.source)
|
||||||
nick = self._parse_user(message.source)[0]
|
|
||||||
|
self._sync_user(nick, metadata)
|
||||||
if message.params:
|
if message.params:
|
||||||
reason = message.params[0]
|
reason = message.params[0]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue