Skip to content

Generate @command usage messages from the invoked command name - #3441

Open
MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:issue228-usage-messages
Open

MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:issue228-usage-messages

Conversation

@MrKeiKun

@MrKeiKun MrKeiKun commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Prelude

Changes Proposed

Command usage messages hardcoded their command names and alias lists, so they
drifted out of sync with conf/atcommand.conf and could not reflect a server's
actual configuration.

This replaces the hardcoded names with a %s filled from the command the player
actually typed, as suggested by @MishimaHaruna in the issue:

The easiest fix would probably be to show the version of the command that was
issued (If you are using the 'ban' command, there's no need for it to also
display 'banish'), and the help strings could simply contain a %s token where
the command name should be displayed.

Before:

@baselvlup            ->  Please enter a level adjustment (usage: @lvup/@blevel/@baselvlup <number of levels>).

After:

@baselvlup            ->  Please enter a level adjustment (usage: @baselvlup <number of levels>).
@blvl                 ->  Please enter a level adjustment (usage: @blvl <number of levels>).
#blvl <charname>      ->  Please enter a level adjustment (usage: #blvl <number of levels>).

This also fixes messages that named the wrong command entirely: @blvl, @jlvl
and @glvl listed only aliases and never their own name; @shownpc reported
usage: @enablenpc, which does not exist; and @nuke, @partyspy and
@guildspy reported the usage of the command they shared a message with.

Note that translations will need the same %s change. The surrounding text is
untouched, so only the usage portion is affected.

Issues addressed: #228

@MrKeiKun
MrKeiKun force-pushed the issue228-usage-messages branch from 1a51a4d to bb1fcb5 Compare September 25, 2026 08:18
Usage messages hardcoded command aliases, which drifted from atcommand.conf
and named commands that no longer exist. Replace them with a %s filled from
the command the player actually typed.
@MrKeiKun
MrKeiKun force-pushed the issue228-usage-messages branch from bb1fcb5 to b98e334 Compare October 3, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant