Raised This Month: $ Target: $400
 0% 

[REQ] Restart server if VAC is disabled


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pizzahut
Senior Member
Join Date: Oct 2004
Old 02-09-2014 , 10:39   [REQ] Restart server if VAC is disabled
Reply With Quote #1

Could someone please write a plugin which does the following:
  • Regularly, e.g. every 10 minutes, check if VAC is enabled and if there are any players on the server.
  • If VAC is disabled and the server is empty, restart it.
The problem is that some servers lose VAC protection after a restart sometimes. The work-around so far is that I check the VAC status in HLSW and restart the ones (rcon exit) which don't have VAC.

The plugin should work with TF2 at least, but I suppose this is a rather generic thing to do so it'll probably work with any game which uses the Source engine.

Last edited by pizzahut; 02-09-2014 at 10:46.
pizzahut is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-09-2014 , 16:36   Re: [REQ] Restart server if VAC is disabled
Reply With Quote #2

This should not happen, but .i think steamtools can check vac status
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 02-09-2014 , 21:50   Re: [REQ] Restart server if VAC is disabled
Reply With Quote #3

I've never had a problem with VAC dropping... is this a widespread thing? Could it be your connection to valve is spotty?
__________________
View my Plugins | Donate
TnTSCS is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-10-2014 , 01:21   Re: [REQ] Restart server if VAC is disabled
Reply With Quote #4

I think it can happen if you have strange iptable rules, also I think it happens if you start the server while steam is down. Only seen it a few times.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Ade
I love purple
Join Date: May 2010
Old 02-10-2014 , 03:31   Re: [REQ] Restart server if VAC is disabled
Reply With Quote #5

that wouldnt help, for me it's too random, both the insecure status appearing, and the fix; restart doesn't actually do it, most of the time it just fixes by itself in time
__________________
Ade is offline
AlfredSpain
Senior Member
Join Date: Oct 2010
Old 02-10-2014 , 03:53   Re: [REQ] Restart server if VAC is disabled
Reply With Quote #6

I have also noticed this problem many times, but no problem if VAC or another factor.
__________________
AlfredSpain is offline
pizzahut
Senior Member
Join Date: Oct 2004
Old 02-10-2014 , 06:07   Re: [REQ] Restart server if VAC is disabled
Reply With Quote #7

Quote:
Originally Posted by friagram View Post
This should not happen, but .i think steamtools can check vac status
Thanks for the hint.

Quote:
Originally Posted by TnTSCS View Post
I've never had a problem with VAC dropping... is this a widespread thing? Could it be your connection to valve is spotty?
Happens every day, e.g. right now it looks like this:



Quote:
Originally Posted by friagram View Post
I think it can happen if you have strange iptable rules, also I think it happens if you start the server while steam is down. Only seen it a few times.
Could be, can't check since someone else is maintaining the firewall.

Last edited by pizzahut; 02-10-2014 at 06:08.
pizzahut is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-10-2014 , 10:24   Re: [REQ] Restart server if VAC is disabled
Reply With Quote #8

Are these Linux servers? Are you using -steamport on their startup lines?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
pizzahut
Senior Member
Join Date: Oct 2004
Old 02-10-2014 , 13:22   Re: [REQ] Restart server if VAC is disabled
Reply With Quote #9

Yes it's Linux. I guess it would help to assign a Steam port for each server?

Start-up line:

screen -dmS port_27015_server_01 ./srcds_run -game tf +ip 94.136.46.32 -port 27015 +tv_port 27020 -autoupdate -steam_dir ~/steamcmd -steamcmd_script ~/steamcmd/update_27015.txt -tickrate 66 +exec server.cfg +map pl_goldrush +log on

Different SourceTV port for each.

Last edited by pizzahut; 02-10-2014 at 13:23.
pizzahut is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-10-2014 , 18:04   Re: [REQ] Restart server if VAC is disabled
Reply With Quote #10

Quote:
Originally Posted by pizzahut View Post
Yes it's Linux. I guess it would help to assign a Steam port for each server?

Start-up line:

screen -dmS port_27015_server_01 ./srcds_run -game tf +ip 94.136.46.32 -port 27015 +tv_port 27020 -autoupdate -steam_dir ~/steamcmd -steamcmd_script ~/steamcmd/update_27015.txt -tickrate 66 +exec server.cfg +map pl_goldrush +log on

Different SourceTV port for each.
The TF2 update on Friday broke running multiple servers on the same IP without manually adding -steamport to each.

It's covered in this thread:
https://forums.alliedmods.net/showth...=235045&page=2

Valve's Fletcher Dunn is aware of the problem and said last week that "We should be able to ship a fix for this early next week."
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 02-10-2014 at 18:10.
Powerlord is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode