Add standalone server chat command "help" and "?"#931
Merged
Conversation
Contributor
Author
|
1.6, enhancement, standalone server |
There was a problem hiding this comment.
Pull request overview
Adds built-in chat command discovery for server commands, including aliases and detailed help output.
Changes:
- Registers
helpand?chat commands during server initialization. - Adds command metadata for descriptions and usage.
- Improves invalid-command feedback to point users toward help.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Source/Common/MultiplayerServer.cs |
Registers the new help command and ? alias. |
Source/Common/ChatCommands.cs |
Adds command metadata, help listing/detail behavior, and updated invalid command messages. |
Comments suppressed due to low confidence (2)
Source/Common/ChatCommands.cs:123
- This hint is also shown to in-game players, but player chat commands must be entered with a leading
/before the server strips it. For aServerPlayer, this should point to/helprather thanhelp; otherwise the suggested follow-up is sent as normal chat and does not run the command.
source.SendMsg($"Unknown command '{args[0]}'. Use help to list available commands.");
Source/Common/ChatCommands.cs:137
- This usage hint is sent through the same help command to both console and in-game chat sources. In-game players need to type
/help <command>, nothelp <command>, so please render the usage with the chat prefix whensource is ServerPlayerand keep the bare form for console input.
source.SendMsg("Use help <command> for detailed usage.");
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| else | ||
| { | ||
| source.SendMsg("Invalid command"); | ||
| source.SendMsg("Invalid command. Use help or ? to list available commands."); |
mibac138
approved these changes
May 19, 2026
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.
Summary
Testing