mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 13:37:17 +02:00
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
|
||||
chkey = channel.key.lower()
|
||||
# find all nicks linked to this channel and delete them
|
||||
for nick in [nick for nick in caller.nicks.get(category="channel")
|
||||
if nick.strvalue.lower() == chkey]:
|
||||
for nick in [nick for nick in make_iter(caller.nicks.get(category="channel", return_obj=True))
|
||||
if nick and nick.strvalue.lower() == chkey]:
|
||||
nick.delete()
|
||||
disconnect = channel.disconnect(player)
|
||||
if disconnect:
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ class ChannelDB(TypedObject):
|
|||
if not disconnect:
|
||||
return False
|
||||
# disconnect
|
||||
self.db_subscriptions.remove(player)
|
||||
self.db_subscriptions.remove(player.dbobj)
|
||||
# post-disconnect hook
|
||||
self.typeclass.post_leave_channel(player.dbobj)
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue