diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 7fb664f14d..d3d5c8c59f 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -274,7 +274,6 @@ namespace OpenSim.Grid.UserServer public override void RunCmd(string cmd, string[] cmdparams) { base.RunCmd(cmd, cmdparams); - switch (cmd) { case "create": @@ -285,6 +284,30 @@ namespace OpenSim.Grid.UserServer Reset(cmdparams); break; + + case "login-level": + // Set the minimal level to allow login + // Usefull to allow grid update without worrying about users. + // or fixing critical issue + if (cmdparams.Length == 1) + { + int level = Convert.ToInt32(cmdparams[0]); + m_loginService.setloginlevel(level); + } + break; + case "login-reset": + if (cmdparams.Length == 1) + { + m_loginService.setloginlevel(0); + } + break; + case "login-text": + if (cmdparams.Length == 1) + { + m_loginService.setwelcometext(cmdparams[0]); + } + break; + case "test-inventory": // RestObjectPosterResponse> requester = new RestObjectPosterResponse>(); // requester.ReturnResponseVal = TestResponse; @@ -316,7 +339,7 @@ namespace OpenSim.Grid.UserServer if (theUser != null) { if (theUser.CurrentAgent != null) - { + { if (theUser.CurrentAgent.AgentOnline) { m_log.Info("[LOGOFF]: Logging off requested user!"); @@ -365,12 +388,16 @@ namespace OpenSim.Grid.UserServer m_console.Notice("create user - create a new user"); m_console.Notice("logoff-user - logs off the specified user from the grid"); m_console.Notice("reset user password - reset a user's password."); + m_console.Notice("login-level - Set the miminim userlevel allowed To login."); + m_console.Notice("login-reset - reset the login level to its default value."); + m_console.Notice("login-text "); + } public override void Shutdown() { m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; - + base.Shutdown(); } diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index bfa454ccaa..fa3cfbd367 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -65,6 +65,18 @@ namespace OpenSim.Grid.UserServer m_config = config; m_inventoryService = inventoryService; } + public void setloginlevel(int level) + { + m_minLoginLevel = level; + m_log.InfoFormat("[GRID] Login Level set to {0} ", level); + + } + public void setwelcometext(string text) + { + m_welcomeMessage = text; + m_log.InfoFormat("[GRID] Login text set to {0} ", text); + + } public override void LogOffUser(UserProfileData theUser, string message) {