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

Refactor chat commands to allow console execution #52

Merged
merged 8 commits into from
Oct 21, 2023
Merged

Conversation

xen-000
Copy link
Collaborator

@xen-000 xen-000 commented Oct 18, 2023

Most commands (mainly admin ones) can now be used directly from the server console or rcon. I've also cleaned up some repetitive printing code and fixed #51.

@xen-000 xen-000 requested a review from Poggicek October 18, 2023 17:48
@xen-000 xen-000 force-pushed the command-refactor branch 2 times, most recently from 2f071d3 to e2b3797 Compare October 21, 2023 11:09
It's useless when the lower byte is always the player slot.
return;
if (args.ArgC() < 3)
{
ClientPrint(player, HUD_PRINTTALK, CHAT_PREFIX "Usage: !mute <name> <duration/0 (permanent)>");
Copy link
Collaborator

@Poggicek Poggicek Oct 21, 2023

Choose a reason for hiding this comment

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

You sure we don't want this to be shown for the console too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They should be shown, I just missed them...

src/commands.cpp Show resolved Hide resolved
Copy link
Collaborator

@Poggicek Poggicek left a comment

Choose a reason for hiding this comment

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

ban command isn't updated to allow for console execution

also remove EntityFromHandle as it was redundant
and remove generichash.cpp, it's already compiled in tier1
@xen-000 xen-000 requested a review from Poggicek October 21, 2023 18:44
@xen-000 xen-000 merged commit a5d0f34 into main Oct 21, 2023
2 checks passed
@xen-000 xen-000 deleted the command-refactor branch October 21, 2023 19:16
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.

!goto issue
2 participants