AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [ANY] automatic server update (windows) (https://forums.alliedmods.net/showthread.php?t=293584)

ambn 02-04-2017 13:02

[ANY] automatic server update (windows)
 
2 Attachment(s)
well, i've been looking for a simple way to make it work, and now i've made something very simple using PTaH extention.
how it works?
this is very simple just follow the steps:
1- make an autoupdate script:
- this is what i use for server crash but it can also used to make your server update it's self on server quit :
Spoiler

2- Server update detection:
- it's also very simple , just use PTaH and The attached plugin so your server will get the first chance to update it's self!
Spoiler

so that's it, your server will update it self each time!
NOTE : i've blocked players from typing MasterRequestRestart , cause it can be used by players to shutdown your server and also your server needs to be empty to get updated ..
this way might look very noobish but at least it's what's possible for windows (or what i know :)).

psychonic 02-04-2017 13:10

Re: [ANY] automatic server update (windows)
 
With that script above, your server will exit if anyone with "MasterRequestRestart" in their name joins. There are probably others ways to exploit it as well.

Instead, the SteamWorks extension has a hook for the callback from Steam that generates the actual message (although it does not work on all games), or any of the extensions that provide an HTTP API can query the Steam UpToDateCheck Web API with the server version from steam.inf to see if the server requires an update.

KyleS 02-04-2017 16:54

Re: [ANY] automatic server update (windows)
 
Quote:

Originally Posted by psychonic (Post 2492835)
With that script above, your server will exit if anyone with "MasterRequestRestart" in their name joins. There are probably others ways to exploit it as well.

Instead, the SteamWorks extension has a hook for the callback from Steam that generates the actual message (although it does not work on all games), or any of the extensions that provide an HTTP API can query the Steam UpToDateCheck Web API with the server version from steam.inf to see if the server requires an update.

Indeed, I wrote a plugin that does this and should support all Valve games. It's small and all you have to do is drag and drop.

ambn 02-08-2017 07:37

Re: [ANY] automatic server update (windows)
 
Quote:

Originally Posted by psychonic (Post 2492835)
With that script above, your server will exit if anyone with "MasterRequestRestart" in their name joins. There are probably others ways to exploit it as well.

Instead, the SteamWorks extension has a hook for the callback from Steam that generates the actual message (although it does not work on all games), or any of the extensions that provide an HTTP API can query the Steam UpToDateCheck Web API with the server version from steam.inf to see if the server requires an update.

Updated .
I Think this is fixed now ...

weeeishy 06-08-2017 20:36

Re: [ANY] automatic server update (windows)
 
Is there a problem with the script? The server just keeps restarting over and over lol, it started happening before the last 2 updates. I'm using sedirector for another server on the same machine and its updating fine.

ambn 06-09-2017 22:08

Re: [ANY] automatic server update (windows)
 
Quote:

Originally Posted by weeeishy (Post 2527216)
Is there a problem with the script? The server just keeps restarting over and over lol, it started happening before the last 2 updates. I'm using sedirector for another server on the same machine and its updating fine.

I am using this script over 50 servers since i released it.
Maybe you did something wrong, maybe posting your script?

Despirator 06-14-2017 01:27

Re: [ANY] automatic server update (windows)
 
I would rather use the SteamWorks extension to detect update request

e54385991 06-14-2017 15:28

Re: [ANY] automatic server update (windows)
 
You can just use this https://forums.alliedmods.net/showthread.php?t=298085

ambn 06-14-2017 22:03

Re: [ANY] automatic server update (windows)
 
This is just a super simple method you can use or not so whatever!

Cats869 04-26-2020 14:26

Re: [ANY] automatic server update (windows)
 
Quote:

Originally Posted by KyleS (Post 2492899)
Indeed, I wrote a plugin that does this and should support all Valve games. It's small and all you have to do is drag and drop.


Hello,

I was wondering which specific plugin that does that? Trying to better understand the SteamWorks but still very much unfamiliar.

I'm trying to get this plugin, that ambn wrote, to work but it won't work since the version of PTaH that this plugin requires is an old version (and newer versions of PTaH inc file has changed quite a bit so it's now incompatible with this unmaintained plugin). Also, if I were to load an older version, CSGO crashes so that's a no go as well.

Thank you!


All times are GMT -4. The time now is 12:10.

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.