Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmddocsgen: note un/nick hist cmds disabled #1765

Merged

Conversation

SoggySaussages
Copy link
Contributor

When generating command docs with username logging config disabled, instead of omitting the relevant commands as is the current behaviour, this PR adds a note mentioning the relevant commands are disabled on the public instance. This
allows for unaffected command docs to be generated including the commands in question on an instance running nickname
logging. For instances with username logging disabled, the docs generate for the benefit of downstream forks using the
upstream's docs while informing it's own users it won't be accessible.

Signed-off-by: SoggySaussages [email protected]

@@ -30,6 +31,12 @@ func (p *Plugin) AddCommands() {
commands.AddRootCommands(p, cmdLogs, cmdWhois, cmdNicknames, cmdUsernames, cmdClearNames)
} else {
commands.AddRootCommands(p, cmdLogs, cmdWhois)
if run.FlagGenCmdDocs {
for _, cmd := range []*commands.YAGCommand{cmdNicknames, cmdUsernames, cmdClearNames} {
cmd.Description = fmt.Sprint(cmd.Description, " Disabled on the public instance.")
Copy link
Contributor

@l-zeuch l-zeuch Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps "disabled on this instance" instead? Though I'm not sure if the average self-hoster bothers to host their own docs, let alone generate command docs, so maybe not, plus it is questionable whether it makes sense for users reading our documentation what we even mean by "this instance".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my thought as well, if you're using gencmddocs you can always mod the source code.

@ashishjh-bst ashishjh-bst merged commit ad2f8b8 into botlabs-gg:dev Nov 20, 2024
1 check passed
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.

3 participants