AmendHub

Download:

jcs

/

subtext

/

amendments

/

513

session: Show user locations in who and last


jcs made amendment 513 about 1 year ago
--- session.c Thu May 4 17:31:27 2023 +++ session.c Thu Jun 15 09:48:09 2023 @@ -1642,7 +1642,7 @@ session_recents(struct session *s) session_printf(s, "{{B}}Recent Logins{{/B}}\r\n"); session_printf(s, - "{{B}}Date Node User Via Speed{{/B}}\r\n"); + "{{B}}Date User Via Speed Location{{/B}}\r\n"); session_flush(s); scount = bile_sorted_ids_by_type(db->sessions_bile, SL_LOG_RTYPE, @@ -1658,12 +1658,12 @@ session_recents(struct session *s) date_tm = localtime((time_t *)&slog.logged_on_at); strftime(sdate, sizeof(sdate), "%m/%d", date_tm); - session_printf(s, "%-7s %-7s %-20s %-7s %-6u\r\n", + session_printf(s, "%-5s %-20s %-7s %-6u %-32s\r\n", sdate, - slog.node, slog.username, slog.via, - slog.tspeed); + slog.tspeed, + slog.location); } session_output(s, "\r\n", 2); @@ -1683,7 +1683,7 @@ session_who(struct session *s) session_printf(s, "{{B}}Who's Online{{/B}}\r\n"); session_printf(s, - "{{B}}Node User Via Speed Idle{{/B}}\r\n"); + "{{B}}Node User Via Speed Idle Location{{/B}}\r\n"); session_flush(s); for (n = 0; n < MAX_SESSIONS; n++) { @@ -1704,12 +1704,13 @@ session_who(struct session *s) sessions[n]->user ? sessions[n]->user->username : GUEST_USERNAME, sessions[n]->user && sessions[n]->user->is_sysop ? " (sysop)" : ""); - session_printf(s, "%-7s %-20s %-7s %-6u %-6s\r\n", + session_printf(s, "%-7s %-17s %-7s %-6u %-5s %-32s\r\n", sessions[n]->node, username, sessions[n]->via, sessions[n]->tspeed, - idle_s); + idle_s, + sessions[n]->location); } session_output(s, "\r\n", 2);