Removing the /port switch on @boot and replacing it with the /sid switch to allow booting someone by their session id

This commit is contained in:
trinsic 2016-12-14 08:24:40 -05:00 committed by Griatch
parent 7ac777e0bf
commit cc8be09d5e

View file

@ -29,7 +29,7 @@ class CmdBoot(COMMAND_DEFAULT_CLASS):
Switches:
quiet - Silently boot without informing player
port - boot by port number instead of name or dbref
sid - boot by session id instead of name or dbref
Boot a player object from the server. If a reason is
supplied it will be echoed to the user unless /quiet is set.
@ -55,12 +55,12 @@ class CmdBoot(COMMAND_DEFAULT_CLASS):
boot_list = []
if 'port' in self.switches:
# Boot a particular port.
sessions = SESSIONS.get_session_list(True)
if 'sid' in self.switches:
# Boot a particular session id.
sessions = SESSIONS.get_sessions(True)
for sess in sessions:
# Find the session with the matching port number.
if sess.getClientAddress()[1] == int(args):
# Find the session with the matching session id.
if sess.sessid == int(args):
boot_list.append(sess)
break
else: