aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-04-11 00:52:28 +0100
committerJustin Clark-Casey (justincc)2014-04-11 00:52:28 +0100
commit7c148d9b2f44597c939a0ba44b1fc5a64d224bb8 (patch)
tree1ba54e13152989ed93915d8baf5ece379a365f45 /OpenSim/Region/ScriptEngine
parentActually add the llRequestAgentData() test class for commit 530c86 (diff)
downloadopensim-SC_OLD-7c148d9b2f44597c939a0ba44b1fc5a64d224bb8.zip
opensim-SC_OLD-7c148d9b2f44597c939a0ba44b1fc5a64d224bb8.tar.gz
opensim-SC_OLD-7c148d9b2f44597c939a0ba44b1fc5a64d224bb8.tar.bz2
opensim-SC_OLD-7c148d9b2f44597c939a0ba44b1fc5a64d224bb8.tar.xz
minor: use constants instead of magic numbers in llRequestAgentData() where possible
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a9f5541..6afabf9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4283,27 +4283,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4283 4283
4284 switch (data) 4284 switch (data)
4285 { 4285 {
4286 case 1: // DATA_ONLINE (0|1) 4286 case ScriptBaseClass.DATA_ONLINE:
4287 if (pinfo != null && pinfo.RegionID != UUID.Zero) 4287 if (pinfo != null && pinfo.RegionID != UUID.Zero)
4288 reply = "1"; 4288 reply = "1";
4289 else 4289 else
4290 reply = "0"; 4290 reply = "0";
4291 break; 4291 break;
4292 case 2: // DATA_NAME (First Last) 4292 case ScriptBaseClass.DATA_NAME: // (First Last)
4293 reply = account.FirstName + " " + account.LastName; 4293 reply = account.FirstName + " " + account.LastName;
4294 break; 4294 break;
4295 case 3: // DATA_BORN (YYYY-MM-DD) 4295 case ScriptBaseClass.DATA_BORN: // (YYYY-MM-DD)
4296 DateTime born = new DateTime(1970, 1, 1, 0, 0, 0, 0); 4296 DateTime born = new DateTime(1970, 1, 1, 0, 0, 0, 0);
4297 born = born.AddSeconds(account.Created); 4297 born = born.AddSeconds(account.Created);
4298 reply = born.ToString("yyyy-MM-dd"); 4298 reply = born.ToString("yyyy-MM-dd");
4299 break; 4299 break;
4300 case 4: // DATA_RATING (0,0,0,0,0,0) 4300 case ScriptBaseClass.DATA_RATING: // (0,0,0,0,0,0)
4301 reply = "0,0,0,0,0,0"; 4301 reply = "0,0,0,0,0,0";
4302 break; 4302 break;
4303 case 7: // DATA_USERLEVEL (integer) 4303 case 7: // DATA_USERLEVEL (integer). This is not available in LL and so has no constant.
4304 reply = account.UserLevel.ToString(); 4304 reply = account.UserLevel.ToString();
4305 break; 4305 break;
4306 case 8: // DATA_PAYINFO (0|1|2|3) 4306 case ScriptBaseClass.DATA_PAYINFO: // (0|1|2|3)
4307 reply = "0"; 4307 reply = "0";
4308 break; 4308 break;
4309 default: 4309 default: