Fixed errors when disconnecting from channels. Resolves #560.
This commit is contained in:
parent
58502b42df
commit
6304e7a068
2 changed files with 3 additions and 3 deletions
|
|
@ -153,8 +153,8 @@ class CmdDelCom(MuxPlayerCommand):
|
||||||
return
|
return
|
||||||
chkey = channel.key.lower()
|
chkey = channel.key.lower()
|
||||||
# find all nicks linked to this channel and delete them
|
# find all nicks linked to this channel and delete them
|
||||||
for nick in [nick for nick in caller.nicks.get(category="channel")
|
for nick in [nick for nick in make_iter(caller.nicks.get(category="channel", return_obj=True))
|
||||||
if nick.strvalue.lower() == chkey]:
|
if nick and nick.strvalue.lower() == chkey]:
|
||||||
nick.delete()
|
nick.delete()
|
||||||
disconnect = channel.disconnect(player)
|
disconnect = channel.disconnect(player)
|
||||||
if disconnect:
|
if disconnect:
|
||||||
|
|
|
||||||
|
|
@ -411,7 +411,7 @@ class ChannelDB(TypedObject):
|
||||||
if not disconnect:
|
if not disconnect:
|
||||||
return False
|
return False
|
||||||
# disconnect
|
# disconnect
|
||||||
self.db_subscriptions.remove(player)
|
self.db_subscriptions.remove(player.dbobj)
|
||||||
# post-disconnect hook
|
# post-disconnect hook
|
||||||
self.typeclass.post_leave_channel(player.dbobj)
|
self.typeclass.post_leave_channel(player.dbobj)
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue