Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[Any] Server Whitelist Advanced


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 490
  • Lokalizacja:AMXX.PL
Offline

Napisano 02.11.2012 00:56

Server Whitelist Advanced

Based on Server Whitelistv. 1.0.0

Features (Admin Commands) :
  • <sm_whitelist_exist | say !whitelist_exist> : Tell if the SteamID or IP is present in the currently loaded whitelist.
  • <sm_whitelist_add | say !whitelist_add> : Add a SteamID or IP to the whitelist file. If adding a SteamID, you should use double-quotes ("").
  • <sm_whitelist_remove | say !whitelist_remove> : Remove a SteamID or IP from the whitelist file. The change is made on map/plugin end (unless whitelist_removeinstant=1), but the loaded whitelist instance is updated instantly. If removing a SteamID, you should use double-quotes ("").
  • -----------
  • <sm_whitelist_reload | say !whitelist_reload> : Reloads the whitelist file.
  • <sm_whitelist_rewrite | say !whitelist_rewrite> : Rewrites the whitelist file to remove SteamId/IPs waiting for map end to be removed. No need if whitelist_removeinstant = 1.
  • <sm_whitelist_list | say !whitelist_list> : List all SteamIDs and IPs in the whitelist file.
What's different from Server Whitelist ? :
  • IPs handling.
  • Possibility to remove from the text file a SteamID/IP.
  • Uses a trie rather than an array :
    • Dynamic size (not fixed at 256).
    • Tries have faster lookup time; meaning faster joining (should be a notable change with thousands of IPs / SteamIDs thought). See this if you don't know anything.
    • Since I'm using a trie, using sm_whitelist_list reads from the file rather than the loaded whitelist, since trie cannot be iterated... :( .
  • Possibility to have different whitelist files and load the one you want. Just change the appropriate ConVar.
CVars : Code: // Enable server whitelist// -// Default: "1"// Minimum: "0.000000"// Maximum: "1.000000"whitelist "1"// File name to use for the whitelist, in the sourcemod/configs/ folder. Can't use '/' or ''. With extension.// -// Default: "whitelist.txt"whitelist_filename "whitelist.txt"// Automatically grant admins access// -// Default: "1"// Minimum: "0.000000"// Maximum: "1.000000"whitelist_immunity "1"// When removing someone from whitelist, update the .txt right away (expensive operation if a lot of people) ? Def. 0= On map end.// -// Default: "0"// Minimum: "0.000000"// Maximum: "1.000000"whitelist_removeinstant "1"Notes :
  • I did contact StevoTVR to ask him if he wanted to update his plugin, and he didn't bother reply (> week) so I decided to make the changes requested in his thread.
  • If you're under linux, you may need to have writing privilege so you can create another file in addonssourcemodconfigs folder.
  • When executing the plugin, if you don't have the file, it will be automaticly created in addonssourcemodconfigs folder.
--------------Any suggestions/comments on the code or the plugin are welcomed and appreciated.Credits to :
  • StevoTVR : Initial idea.
Changelog :
  • 1.0.0 Initial release. (01-11-2012)
Todo list :
  • None at the moment. You're free to suggest things ;).
Attached Files Dołączona grafika whitelist.txt (329 Bytes) Dołączona grafika Get Plugin or Get Source (serverwhitelistadvanced.sp - 17.4 KB)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych