mirror of
https://github.com/TechplexEngineer/plexview.git
synced 2026-07-31 04:07:24 +00:00
Able to login and out user
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user