sourcebans-pp icon indicating copy to clipboard operation
sourcebans-pp copied to clipboard

Added discord webhook for ban protests

Open B3none opened this issue 4 years ago • 5 comments

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

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

Checklist:

  • [x] 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.

B3none avatar Mar 29 '20 19:03 B3none

@b3none enjoy this change, I hope it will be merged into the project, thank you.

I find it interesting to implement this feature also for Report Player. When a player makes a report on the Web Interface he would send it to Discord as well.

Suggestion for both implementation, it would be interesting if you had how to control which channel the messages would be sent to, but for that I believe you would need a plugin, something like the discord-forward plugin, would you be right?

crashzk avatar Apr 03 '20 05:04 crashzk

No, you would not need a plugin for that.

Waiting for Groruk's view on this, not sure if it should be merged into core.

rumblefrog avatar Apr 05 '20 03:04 rumblefrog

@b3none could make that work with current release ? ill get: Fatal error: Call to undefined function curl_init() in /var/www/html/bans/pages/page.protest.php on line 169

really looking forward to this addition, its annoying to manually look at protest ^^

TheGunter24 avatar May 06 '20 20:05 TheGunter24

@b3none could make that work with current release ? ill get: Fatal error: Call to undefined function curl_init() in /var/www/html/bans/pages/page.protest.php on line 169

really looking forward to this addition, its annoying to manually look at protest ^^

Ensure you have php-curl extension downloaded and enabled

B3none avatar May 06 '20 21:05 B3none

Suggestion for both implementation, it would be interesting if you had how to control which channel the messages would be sent to, but for that I believe you would need a plugin, something like the discord-forward plugin, would you be right?

I may be wrong on this because I haven't tested this pull request myself, but I believe the webhook URL can be set per channel in Discord too, so that shouldn't be an issue.

SugarD-x avatar Dec 22 '21 13:12 SugarD-x