Fixed code to pass unittests. Change script's is_valid method to correctly catch if it is checked on an object which is already deleted, as per #509.
This commit is contained in:
parent
3a6a8d5c48
commit
53b204bb76
8 changed files with 21 additions and 17 deletions
|
|
@ -333,13 +333,13 @@ class CmdCdestroy(MuxPlayerCommand):
|
|||
if not channel.access(caller, 'control'):
|
||||
self.msg("You are not allowed to do that.")
|
||||
return
|
||||
|
||||
message = "%s is being destroyed. Make sure to change your aliases." % channel
|
||||
channel_key = channel.key
|
||||
message = "%s is being destroyed. Make sure to change your aliases." % channel_key
|
||||
msgobj = create.create_message(caller, message, channel)
|
||||
channel.msg(msgobj)
|
||||
channel.delete()
|
||||
CHANNELHANDLER.update()
|
||||
self.msg("Channel '%s' was destroyed." % channel)
|
||||
self.msg("Channel '%s' was destroyed." % channel_key)
|
||||
|
||||
|
||||
class CmdCBoot(MuxPlayerCommand):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue