Able to login and out user

This commit is contained in:
Blake Bourque
2015-06-23 23:39:06 -04:00
parent 0bb2dff347
commit 068d53279e
12 changed files with 277 additions and 20 deletions
+15 -20
View File
@@ -1,32 +1,27 @@
using System;
using System.Collections.Generic;
using OpenMetaverse;
using Nancy;
using Nancy.Hosting.Self;
namespace PlexView
{
public class PlexView
{
// public GridMgr grids;
// public ClientMgr clients;
public PlexView (string[] args)
{
GridClient client = new GridClient();
client.Settings.LOGIN_SERVER = "http://login.osgrid.org/";
if (client.Network.Login("", "", "", "FirstBot", "1.0"))
{
// Yay we made it! let's print out the message of the day
Console.WriteLine("You have successfully logged into Second Life!\n The Message of the day is {0}\nPress any Key to Logout",
client.Network.LoginMessage);
Console.ReadLine(); // Wait for user to press a key before we continue
client.Network.Logout(); // Lets logout since we're done here
}
else
{
// tell the user why the login failed
Console.WriteLine("We were unable to login to Second Life, The Login Server said: {0}",
client.Network.LoginMessage);
}
Console.WriteLine("Press Any Key to Exit");
Console.ReadLine(); // Wait for user to press a key before we exit
//bootstrap the app here, initialize services, start http, get ready!
Console.WriteLine ("Server Starting");
var nancyHost = new NancyHost(Constants.HTTP_URL);
nancyHost.Start();
Console.WriteLine("HTTP server listening "+Constants.HTTP_URL);
Console.ReadKey();
}
}
}