Factor out common registration of "show uptime" command

This commit is contained in:
Justin Clark-Casey (justincc)
2012-11-22 04:11:03 +00:00
parent 5c48d7a378
commit cf03d6ea92
3 changed files with 80 additions and 73 deletions

View File

@@ -49,6 +49,18 @@ namespace OpenSim.Framework.Servers
m_startuptime = DateTime.Now;
}
/// <summary>
/// Register common commands once m_console has been set if it is going to be set
/// </summary>
public void RegisterCommonCommands()
{
if (m_console == null)
return;
m_console.Commands.AddCommand(
"General", false, "show uptime", "show uptime", "Show server uptime", HandleShow);
}
public virtual void HandleShow(string module, string[] cmd)
{
List<string> args = new List<string>(cmd);