Added idle timeout code to help combat the screwed up session situation. Some admins would've wanted this eventually, but it'll help until I figure out how to close dead sessions that look like they're still alive. Added a new server config directive, idle_timeout. If the value is non-zero, the idle timeout is the respective number of seconds between commands. Also, the IDLE command will save you from idle timeouts but won't modify your publicly visible idle time.

This commit is contained in:
Greg Taylor 2007-05-09 15:28:12 +00:00
parent 32fa9e419a
commit f1dd985294
6 changed files with 34 additions and 11 deletions

View file

@ -307,12 +307,12 @@ def cmd_who(cdat):
for player in session_list:
if not player.logged_in:
continue
delta_cmd = time.time() - player.cmd_last
delta_cmd = time.time() - player.cmd_last_visible
delta_conn = time.time() - player.conn_time
plr_pobject = player.get_pobject()
retval += '%-16s%9s %4s%-3s#%-6d%5d%3s%-25s\r\n' % \
(plr_pobject.get_name()[:25].ljust(27), \
(plr_pobject.get_name(show_dbref=False)[:25].ljust(27), \
# On-time
functions_general.time_format(delta_conn,0), \
# Idle time