• 0
DEN

RCON restartWarningTime not work v. 0.9.8

Question

when server will restart not show message before restart . This bug  happen after  update to 0.98
 

class RCON
	{
		
		serverPassword = "password";

		
		useAutoLock = 1;

		
		restartAutoLock = 10;

		
		restartTimer[] = {3, 0};

		
		useAutoKick = 1;

	
		kickTime = 5;

		
		useRestartMessages = 1;

		
		restartWarningTime[] = {20, 15, 10, 5, 3}; 

		useShutdown = 1;
	};


 

Share this post


Link to post
Share on other sites

13 answers to this question

  • 1

Hi, I have made a temporary workaround for this problem, until the devs have been looking into this issue.

I have replaced two lines of code in file ExileServer_system_rcon_thread_check.sqf 

I commented the original code at line 29 and 45 and inserted the temporary fix right below them.

maybe the easiest way is to copy/(or download) the code from the gist link and replace all code in the  ExileServer_system_rcon_thread_check.sqf  file. (make a backup of the original file first) 

This works on my server so if anyone want's to use this as a workaround until the devs have a real fix i have uploaded the file to gist on the link below:

Temporary workaround for missing restart warnings

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement
  • 0

you need to set serverPassword = "password"; if not the server will not shut down or best thing is to use inferstar

Share this post


Link to post
Share on other sites
  • 0

@Rappidxshots I set the password man. Server shut down and lock/unlock works perfect. only the messages dont appear.

Share this post


Link to post
Share on other sites
  • 0

No warnings for me also AND the server restarts after 3 hours regardless if set to 4 or 5 hours or 10 hour restarts

Share this post


Link to post
Share on other sites
  • 0

I have this problem too, I get error messages in my .rpt log every time it should read out restart warnings (at 15, 10, 5 and 3 minutes.)

this is how it looks in the .rpt log:

17:27:15 Error in expression <ters = _this select 2;
switch (typeName _recipient) do 
{
case "OBJECT": 
{
_own>
17:27:15   Error position: <_recipient) do 
{
case "OBJECT": 
{
_own>
17:27:15   Error Undefined variable in expression: _recipient
17:27:15 File exile_server\code\ExileServer_system_network_send_to.sqf, line 16
17:27:15 Error in expression <
if (count ExileSessionIDs > 0) then
{
[_sessionID, "toastRequest", ["InfoTitleA>
17:27:15   Error position: <_sessionID, "toastRequest", ["InfoTitleA>
17:27:15   Error Undefined variable in expression: _sessionid
17:27:15 File exile_server\code\ExileServer_system_rcon_thread_check.sqf, line 29
17:27:15 "ExileServer - Restart Warnings for 15min sent"

 

 

Share this post


Link to post
Share on other sites
  • 0

It looks like (just as the error message say) that the _sessionID variable never gets initialized in ExileServer_system_rcon_thread_check.sqf before calling ExileServer_system_network_send_to.sqf

 

Here is how it looks in ExileServer_system_rcon_thread_check.sqf :

private["_restartTime","_useAutoKick","_kickTime","_lockTime","_uptime","_timeTilRestart","_time","_sessionID","_i"];
_restartTime = _this select 0;
_useAutoKick = _this select 1;
_kickTime = _this select 2;
_lockTime = _this select 3;
_uptime = call ExileServer_util_time_uptime;
_timeTilRestart = _restartTime - _uptime;
if (typeName ExileServerRestartMessages isEqualTo "ARRAY") then
{
	if !(ExileServerRestartMessages isEqualTo []) then
	{
		{
			_time = _x;
			if (_timeTilRestart < _time) then
			{
				if (count ExileSessionIDs > 0) then
				{
					[_sessionID, "toastRequest", ["InfoTitleAndText", ["Restart incoming!", format["Server is going to restart in %1 min! Log out before the restart to prevent gear loss.", _time] ]]] call ExileServer_system_network_send_to;
				};
				ExileServerRestartMessages deleteAt _forEachIndex;
				format ["Restart Warnings for %1min sent",_time] call ExileServer_util_log;
			};
		} 
		forEach ExileServerRestartMessages;
	};
};

 

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

On my server some time have warning with red text but some time not warning.
Server restart , lock and kick work but warning not work

 

Edited by DEN

Share this post


Link to post
Share on other sites
  • 0
18 hours ago, MurarN said:

Hi, I have made a temporary workaround for this problem, until the devs have been looking into this issue.

I have replaced two lines of code in file ExileServer_system_rcon_thread_check.sqf 

I commented the original code at line 29 and 45 and inserted the temporary fix right below them.

maybe the easiest way is to copy/(or download) the code from the gist link and replace all code in the  ExileServer_system_rcon_thread_check.sqf  file. (make a backup of the original file first) 

This works on my server so if anyone want's to use this as a workaround until the devs have a real fix i have uploaded the file to gist on the link below:

Temporary workaround for missing restart warnings

Thx man. I test it on my server today

Share this post


Link to post
Share on other sites
  • 0
On 7/3/2016 at 10:00 PM, MurarN said:

Hi, I have made a temporary workaround for this problem, until the devs have been looking into this issue.

I have replaced two lines of code in file ExileServer_system_rcon_thread_check.sqf 

I commented the original code at line 29 and 45 and inserted the temporary fix right below them.

maybe the easiest way is to copy/(or download) the code from the gist link and replace all code in the  ExileServer_system_rcon_thread_check.sqf  file. (make a backup of the original file first) 

This works on my server so if anyone want's to use this as a workaround until the devs have a real fix i have uploaded the file to gist on the link below:

Temporary workaround for missing restart warnings

Thank this work my server

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.