mirror of
https://oauth2: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@github.com/m1ngsama/TNT.git
synced 2026-06-26 07:04:37 +08:00
Move the SSH exec subcommand interface (help, health, users, stats, tail, post) and the dispatcher out of ssh_server.c into a dedicated module. New API (include/exec.h): - exec_dispatch(client_t *) -- single entry point invoked from the bootstrap path when client->exec_command[0] != '\0'. Helpers that travel with the exec subcommands: - format_timestamp_utc, trim_ascii_whitespace, json_append_string, resolve_exec_username, parse_tail_count Two cross-module bridges: - is_valid_username() lifted into common.c/h since exec, the input read path, and the :nick command all need it. - ssh_server_start_time() added to ssh_server.h as a read-only accessor; exec_command_stats no longer reaches into the global. - notify_mentions stays in ssh_server.c for now and is exposed via ssh_server.h. Will move to a dedicated client.c during PR2-M6. ssh_server.c shrinks from 2200 to 1769 lines (-431). Behaviour is preserved: implementations are byte-for-byte the same. |
||
|---|---|---|
| .. | ||
| .gitkeep | ||
| chat_room.h | ||
| common.h | ||
| exec.h | ||
| message.h | ||
| ratelimit.h | ||
| ssh_server.h | ||
| tui.h | ||
| utf8.h | ||