Fixed an issue with using WHO when users where OOC. Also made the @ic command able to look for objects globally.
This commit is contained in:
parent
3431891b6b
commit
68f0a236cb
1 changed files with 7 additions and 1 deletions
|
|
@ -383,9 +383,14 @@ class CmdWho(MuxCommand):
|
||||||
for session in session_list:
|
for session in session_list:
|
||||||
if not session.logged_in:
|
if not session.logged_in:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
delta_cmd = time.time() - session.cmd_last_visible
|
delta_cmd = time.time() - session.cmd_last_visible
|
||||||
delta_conn = time.time() - session.conn_time
|
delta_conn = time.time() - session.conn_time
|
||||||
plr_pobject = session.get_character()
|
plr_pobject = session.get_character()
|
||||||
|
if not plr_pobject:
|
||||||
|
plr_pobject = session.get_player()
|
||||||
|
show_session_data = False
|
||||||
|
table = [["Player Name"], ["On for"], ["Idle"]]
|
||||||
if show_session_data:
|
if show_session_data:
|
||||||
table[0].append(plr_pobject.name[:25])
|
table[0].append(plr_pobject.name[:25])
|
||||||
table[1].append(utils.time_format(delta_conn, 0))
|
table[1].append(utils.time_format(delta_conn, 0))
|
||||||
|
|
@ -397,6 +402,7 @@ class CmdWho(MuxCommand):
|
||||||
table[0].append(plr_pobject.name[:25])
|
table[0].append(plr_pobject.name[:25])
|
||||||
table[1].append(utils.time_format(delta_conn,0))
|
table[1].append(utils.time_format(delta_conn,0))
|
||||||
table[2].append(utils.time_format(delta_cmd,1))
|
table[2].append(utils.time_format(delta_cmd,1))
|
||||||
|
|
||||||
stable = []
|
stable = []
|
||||||
for row in table: # prettify values
|
for row in table: # prettify values
|
||||||
stable.append([str(val).strip() for val in row])
|
stable.append([str(val).strip() for val in row])
|
||||||
|
|
@ -665,7 +671,7 @@ class CmdIC(MuxCommand):
|
||||||
return
|
return
|
||||||
if not new_character:
|
if not new_character:
|
||||||
# search for a matching character
|
# search for a matching character
|
||||||
new_character = caller.search(self.args)
|
new_character = caller.search(self.args, global_search=True)
|
||||||
if not new_character:
|
if not new_character:
|
||||||
# the search method handles error messages etc.
|
# the search method handles error messages etc.
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue