From 6996bab4a154a7c6936c35af65e439e5a42c84b5 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 26 Jul 2017 20:13:30 +0100 Subject: display remaining pass time in hours, mins or seconds acording to value --- OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 64411e6..f422708 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -594,7 +594,15 @@ namespace OpenSim.Region.CoreModules.World.Land currenttime = ldata.ParcelAccessList[idx].Expires - now; if(currenttime > (int)(0.25f * expires + 0.5f)) { - remote_client.SendAgentAlertMessage("You already have pass valid for " + string.Format("{0:0.##} minutes", currenttime/60.0f), false); + if(currenttime > 3600) + remote_client.SendAgentAlertMessage(string.Format("You already have a pass valid for {0:0.###} hours", + currenttime/3600f), false); + else if(currenttime > 60) + remote_client.SendAgentAlertMessage(string.Format("You already have a pass valid for {0:0.##} minutes", + currenttime/60f), false); + else + remote_client.SendAgentAlertMessage(string.Format("You already have a pass valid for {0:0.#} seconds", + currenttime), false); return; } } -- cgit v1.1