Modernize server console - #5288
Open
MohabCodeX wants to merge 2 commits into
Open
Conversation
…e and scrollback - Decouple cursor position from buffer length to prevent destructive overwrite - Support Home, End, Delete, Insert, word jumps (Ctrl+Left/Right), word erase (Ctrl+Backspace) and Esc - Add keyboard clipboard paste (Ctrl+V, Shift+Insert) via Win32 API without QuickEdit freeze - Expand vertical screen buffer height to 5000 lines and fix mouse-wheel scrolling - Route live server status tag to Console Window Title, eliminating scroll buffer overwrite - Clarify live status header metrics to show sync rate, logic rate, and configured fps limit - Add Tab auto-completion for console commands and resource names - Add cls/clear console commands, Ctrl+L shortcut, and semicolon (;) command chaining - Add persistent command history across server restarts (128 entries) with deduplication - Filter sensitive commands (login, register, passwords) from persistent disk history - Atomic prompt-preserving multi-part log streaming to eliminate drift and caret shutter - Optimize console command lookup with O(1) unordered_map hash table - Safe command tokenization without 256-byte truncation and thread-unsafe strtok - Eliminate heap thrashing in CLogger by pre-allocating exact capacities - Bound command history and enable Virtual Terminal processing on Windows
Contributor
|
Wow, thank you! |
Contributor
|
Cool. |
|
Interesting, good work. |
|
nice one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernizes the server console with line editing, mouse-wheel scrolling, clipboard pasting, and command history.

Changes
Ctrl+VandShift+Insert) using Windows clipboard APIs without enabling QuickEdit mode (avoiding server freeze deadlocks).SetConsoleTitleW) withsync / logic / fps limitlabels instead of drawing over buffer cells.mods/deathmatch/priv/history.txt(capped at 128 entries, matching client behavior), with deduplication and sanitization of sensitive password arguments.Tabcommand and resource name auto-completion.clsandclearcommands,Ctrl+Lshortcut, and semicolon (;) command chaining.CConsolewith anunordered_maphash table and remove the fixed 256-byte input truncation.CLoggerto reduce heap allocations.Test plan
Home,End,Delete,Insert,Ctrl+Arrows) and insert text mid-string.Ctrl+VandShift+Insert.Up/Downarrows.login,register,chgpass) have sensitive arguments sanitized in history.console_spam_test) and verify logs stay left-aligned while input continues smoothly underneath.Tabauto-completion on commands and resource names.cls,clear,Ctrl+L, and chained commands (refresh; start admin).