Fixed regression in @shutdown command due to previous changes to session handling. Resolves #895.

This commit is contained in:
Griatch 2015-12-17 00:24:33 +01:00
parent 84aeb9ed3a
commit ff46bf9103

View file

@ -108,10 +108,8 @@ class CmdShutdown(MuxCommand):
def func(self): def func(self):
"Define function" "Define function"
try:
# Only allow shutdown if caller has session # Only allow shutdown if caller has session
self.caller.sessions[0] if not self.caller.sessions.get():
except Exception:
return return
self.msg('Shutting down server ...') self.msg('Shutting down server ...')
announcement = "\nServer is being SHUT DOWN!\n" announcement = "\nServer is being SHUT DOWN!\n"