[Any] Self-Ban (v1.3, 2023-June-03)
Description
I stumbled upon this functionality on a server I joined a couple weeks ago but couldn't find the plugin they were using so I decided to make one and open source it.
- Self-Ban is a Sourcemod plugin that allows users to permanently ban themselves from a server using the chat command '!banme'.
Source Code on Github
Features- Ban yourself permanently with the '!banme' chat command.
- Ban info is displayed in the server console and chat box of all clients.
- Automatic logging of the ban to SourceMod's log with date and time.
Commands- '!banme' - bans user permanently.
Configurations
Plans- This plugin registers its command directly as a chat command '!banme', and not 'sm_banme' (I was unaware of sm_ commands creating '!' chat variants, but once I learned it, it didn't seem necessary (who is gonna ban themselves from console?). In any case, if this goes against any rules, I will consider changing it. But Other than that, none at the moment, though feel free to raise issues/pull requests in the Github repository.
Changelog- 2023-06-02 (v1.0)
- Initial release.
- 2023-06-03 (v1.1)
- Add input checks, user validation, logging, and printing to console.
- 2023-06-03 (v1.2)
- Add a couple of delays so the banned user isn't immediately kicked.
- 2023-06-03 (v1.3)
- Fixed a couple of typos.
Enjoy the plugin, and if you encounter any issues or have any suggestions, feel free to submit an issue on the Github repository.