Skocz do zawartości

[RSS] [ANY] SQL Whois


GameNation

Rekomendowane odpowiedzi

This is long overdue for posting - I wrote it 13 years ago when the joe.to community was running multiple TF2 and L4D/L4D2 servers. I tested it tonight on a freshly-installed server, and it still works, although I had to disable strict SQL mode which is now apparently A Thing.

It's a port of Bugblatter's plugin_blatt_whois for Adminmod, the major difference (AM/SM aside) being that it stores in a central database rather than 5 zillion flatfiles.

I had a look at the current crop of Sourcemod plugins and while there are a couple of whois plugins, neither approach the functionality of Bugblatter's original.

It's not perfect, and there's a few things I wanted to add but never got to, but it is really rather good.

Dependencies:

SQL admins enabled and running off a MariaDB or MySQL database. Not tested with SQLite.

Features:

- records kicks and bans with reasons on a player's record
- allows you to place/remove a watch on players even if they're not currently connected
- notifies admins when watched players or players on LAN are on the server

The notification timer is set for 2 minutes - you may want to adjust this or disable it altogether if it gets annoying. Editing the timer amount in line 26 (or commenting out with a //) and recompiling will solve that for you.

Example output:

68747470733a2f2f6769746875622e636f6d2f6b

Commands:

sm_whois <steamID|name> - Show a player's activity
sm_lan - Show players using the same IP address
sm_note <steamID|name> <note> - Record note on player's record
sm_watch <steamID|name> <reason> - Record watch against player (reason required)
sm_unwatch <steamID|name> <reason> - Remove existing watch against player (reason required)

Installation:

Edit whois.sp and recompile the .smx if needed.
Turn off Strict SQL mode by adding 'sql_mode=NO_ENGINE_SUBSTITUTION' to your MySQL/MariaDB my.cnf.
Restart the DB.
Stop your server.
Drop the .smx into your plugins directory.
Login to the SQL server you're using for sourcemod and run the contents of whois.sql.txt - this will setup all the tables needed.
Start your server.

Attached Files
File Type: sp Get Plugin or Get Source (whois.sp - 22.2 KB)
File Type: txt whois.sql.txt (2.0 KB)

Przeczytaj cały wpis

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ę.