Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSS[ANY] Plugin Updates Checker (1.0) [11-Jul-2021]


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
About:
  • Automatically check for plugin updates on server start, or once per day, or manually via command.
  • Downloads a list of links to check, each webpage containing lists of plugins and their latest version numbers from various authors (currently only Silvers).
  • Compares the servers version cvars from these lists with their latest known version number.
  • A future version by Dragokas will hopefully include most plugins on AM. I've uploaded this as a proof-of-concept and demonstrating some code.


Current plugin authors with manual lists:

Thanks:
  • "Asherkin", "KyleS" and "Tsunami" for their extensions this plugin uses.
  • "GoD-Tony" for their "Updater" plugin where the networking code was adapted from.
  • "Dragokas" - For ideas and testing.
  • "Lux" - For ideas and testing.
  • "Marttt" - For ideas and testing.



Example Output:
Spoiler



Custom List of Links:
  • Optional data config allows for overriding the main list, instead of downloading it.
  • Save to plugin_updates_checker.cfg in your servers \sourcemod\data\ folder.
  • On each newline put a link to a webpage which contains lists of plugins.
For example:
Spoiler


Custom List of Plugins:
  • The command sm_updates_config opens the file data/plugin_updates.cfg on the server (the file format is shown in the example below, or here).
  • The file is read and an updated version is saved to data/plugin_updates_cmd.cfg with the latest version numbers found running on the server from the listed plugins.
  • Lists are maintained by plugin authors. (Please submit links to be included in the default main list).
  • The webpages must be raw with no other data except a list of plugins in the following format:
For example:
Spoiler


Admin Commands: (requires "z" flag)

PHP Code:

sm_updates          // Check for plugin updates.
sm_updates_config   // Updates the data/plugin_updates.cfg config with detected cvar version numbers from plugins listed in the config. 



CVars:

Saved to sm_updates_checker.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:

// 0=Manual checking only. 1=Automatically check on server start. 2=Check on server start and once per day (if uptime >= 24 hours).
sm_updates_auto "1"

// Ignores plugins using these version cvars, separate by commas (no spaces).
sm_updates_ignore ""

// 0=Print to server console. 1=Logs to sourcecmod/logs/plugin_updates.txt listing plugins whose version differs from the servers. 2=Print to server console and logs to file.
sm_updates_logs "2"

// Plugin Updates Checker plugin version.
sm_updates_version 



Changes:
Code:

1.0 (20-Apr-2021)
    - Initial release.

0.1 (25-May-2020)
    - Initial creation.


Compiling:
You MUST download the include files from these extensions.
  1. REST in Pawn extension by "Tsunami".
  2. SteamTools extension by "Asherkin".
  3. SteamWorks extension by "KyleS".


Requirements: (one of the following extensions)
  1. REST in Pawn (Windows requires version 1.2.4+).
  2. SteamTools (TF2 only).
  3. SteamWorks.


Warning:
Windows cannot fully download the lists using REST in Pawn, a future update to this extension should fix it.

Installation:
DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires includes from the above extensions!
  1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder. (Compiled with 1.10).

Attached Files
File Type: sp Get Plugin or Get Source (plugin_updates_checker.sp - 26.9 KB)
File Type: smx plugin_updates_checker.smx (14.2 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

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

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