OpenSim.Region.ScriptEngine.Shared.Api.OSSL_Api.RegionRestart C# (CSharp) Method

RegionRestart() private method

private RegionRestart ( double seconds, string msg ) : void
seconds double
msg string
return void
        private void RegionRestart(double seconds, string msg)
        {
            IRestartModule restartModule = World.RequestModuleInterface<IRestartModule>();

            List<int> times = new List<int>();
            while (seconds > 0)
            {
                times.Add((int)seconds);
                if (seconds > 300)
                    seconds -= 120;
                else if (seconds > 120)
                    seconds -= 60;
                else if (seconds > 60)
                    seconds -= 30;
                else
                    seconds -= 15;
            }

            if (msg == String.Empty)
                restartModule.ScheduleRestart(UUID.Zero, "Region: " + World.RegionInfo.RegionName + " is about to restart.\n\nIf you stay here you will be logged out.\n\n\nTime remaining: {0}.\n", times.ToArray(), true);

            else
                restartModule.ScheduleRestart(UUID.Zero, msg + "\n\nTime remaining: {0}.\n", times.ToArray(), true);
        }
OSSL_Api