aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-02 15:36:10 +0000
committerMelanie Thielker2008-10-02 15:36:10 +0000
commit8963522aab4a2cf1bc9180e7e11284dec1295582 (patch)
tree10f76e9891cbbdd3bf63d1090c1f6a8703a46463 /OpenSim
parentSquare hollow size in cylinder meshes were a little too small - fixed. (diff)
downloadopensim-SC_OLD-8963522aab4a2cf1bc9180e7e11284dec1295582.zip
opensim-SC_OLD-8963522aab4a2cf1bc9180e7e11284dec1295582.tar.gz
opensim-SC_OLD-8963522aab4a2cf1bc9180e7e11284dec1295582.tar.bz2
opensim-SC_OLD-8963522aab4a2cf1bc9180e7e11284dec1295582.tar.xz
Mantis #2314
Thank you, sacha magne, for a patch to add login level and message commands to the user server
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs33
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs12
2 files changed, 42 insertions, 3 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 7fb664f..d3d5c8c 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -274,7 +274,6 @@ namespace OpenSim.Grid.UserServer
274 public override void RunCmd(string cmd, string[] cmdparams) 274 public override void RunCmd(string cmd, string[] cmdparams)
275 { 275 {
276 base.RunCmd(cmd, cmdparams); 276 base.RunCmd(cmd, cmdparams);
277
278 switch (cmd) 277 switch (cmd)
279 { 278 {
280 case "create": 279 case "create":
@@ -285,6 +284,30 @@ namespace OpenSim.Grid.UserServer
285 Reset(cmdparams); 284 Reset(cmdparams);
286 break; 285 break;
287 286
287
288 case "login-level":
289 // Set the minimal level to allow login
290 // Usefull to allow grid update without worrying about users.
291 // or fixing critical issue
292 if (cmdparams.Length == 1)
293 {
294 int level = Convert.ToInt32(cmdparams[0]);
295 m_loginService.setloginlevel(level);
296 }
297 break;
298 case "login-reset":
299 if (cmdparams.Length == 1)
300 {
301 m_loginService.setloginlevel(0);
302 }
303 break;
304 case "login-text":
305 if (cmdparams.Length == 1)
306 {
307 m_loginService.setwelcometext(cmdparams[0]);
308 }
309 break;
310
288 case "test-inventory": 311 case "test-inventory":
289 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>(); 312 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>();
290 // requester.ReturnResponseVal = TestResponse; 313 // requester.ReturnResponseVal = TestResponse;
@@ -316,7 +339,7 @@ namespace OpenSim.Grid.UserServer
316 if (theUser != null) 339 if (theUser != null)
317 { 340 {
318 if (theUser.CurrentAgent != null) 341 if (theUser.CurrentAgent != null)
319 { 342 {
320 if (theUser.CurrentAgent.AgentOnline) 343 if (theUser.CurrentAgent.AgentOnline)
321 { 344 {
322 m_log.Info("[LOGOFF]: Logging off requested user!"); 345 m_log.Info("[LOGOFF]: Logging off requested user!");
@@ -365,12 +388,16 @@ namespace OpenSim.Grid.UserServer
365 m_console.Notice("create user - create a new user"); 388 m_console.Notice("create user - create a new user");
366 m_console.Notice("logoff-user <firstname> <lastname> <message> - logs off the specified user from the grid"); 389 m_console.Notice("logoff-user <firstname> <lastname> <message> - logs off the specified user from the grid");
367 m_console.Notice("reset user password - reset a user's password."); 390 m_console.Notice("reset user password - reset a user's password.");
391 m_console.Notice("login-level <value> - Set the miminim userlevel allowed To login.");
392 m_console.Notice("login-reset - reset the login level to its default value.");
393 m_console.Notice("login-text <text to print during the login>");
394
368 } 395 }
369 396
370 public override void Shutdown() 397 public override void Shutdown()
371 { 398 {
372 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; 399 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
373 400
374 base.Shutdown(); 401 base.Shutdown();
375 } 402 }
376 403
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index bfa454c..fa3cfbd 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -65,6 +65,18 @@ namespace OpenSim.Grid.UserServer
65 m_config = config; 65 m_config = config;
66 m_inventoryService = inventoryService; 66 m_inventoryService = inventoryService;
67 } 67 }
68 public void setloginlevel(int level)
69 {
70 m_minLoginLevel = level;
71 m_log.InfoFormat("[GRID] Login Level set to {0} ", level);
72
73 }
74 public void setwelcometext(string text)
75 {
76 m_welcomeMessage = text;
77 m_log.InfoFormat("[GRID] Login text set to {0} ", text);
78
79 }
68 80
69 public override void LogOffUser(UserProfileData theUser, string message) 81 public override void LogOffUser(UserProfileData theUser, string message)
70 { 82 {