Skocz do zawartości

[RSS] [L4D2] Self-Ban (v1.3, 2023-06-03)


GameNation

Rekomendowane odpowiedzi

[L4D2] Self-Ban (v1.3, 2023-06-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
  • None.

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.

Attached Files
File Type: sp Get Plugin or Get Source (self_ban.sp - 3.3 KB)

Przeczytaj cały wpis na stronie AlliedModders

Odnośnik do komentarza
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Gość
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.