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

feat(comms): provide custom reason #615

Open
wants to merge 1 commit into
base: v1.x
Choose a base branch
from
Open

Conversation

rumblefrog
Copy link
Member

Description

Adds a hook and option to allow custom reason input via chat

Motivation and Context

Implements and closes #578

How Has This Been Tested?

Not yet tested

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

AddCommandListener(CommandCallback, "sm_gag");
AddCommandListener(CommandCallback, "sm_mute");
AddCommandListener(CommandCallback, "sm_silence");
AddCommandListener(CommandCallback, "sm_ungag");
AddCommandListener(CommandCallback, "sm_unmute");
AddCommandListener(CommandCallback, "sm_unsilence");

AddCommandListener(ReasonHook, "say");
AddCommandListener(ReasonHook, "say_team");
Copy link
Contributor

Choose a reason for hiding this comment

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

https://sm.alliedmods.net/new-api/console/OnClientSayCommand
Absolute identically forward. Calls when client use say or say_team.


GetCmdArgString(sReason, sizeof sReason);

if (StrEqual(sReason, "!noreason"))
Copy link
Contributor

Choose a reason for hiding this comment

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

On TF2, result of execution say command is located in quotation marks, so you receive string like "!noreason" (with quotes, yes)

@crashzk
Copy link

crashzk commented Jul 14, 2020

@rumblefrog would this PR be to include the option to customize the reason, insert a reason in the punishments of the comms?

I would like to know just so that I can test, I would like to see this feature in future updates. In any case, I will test these changes and inform you here.

@crashzk
Copy link

crashzk commented Oct 10, 2021

Can it be merged into the v1.x ​branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sourcecomms "Other" mute/gag reason
4 participants