mirror of
https://github.com/evennia/evennia.git
synced 2026-03-17 05:16:31 +01:00
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:
parent
7ac777e0bf
commit
cc8be09d5e
1 changed files with 6 additions and 6 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue