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