Commit 8ffe9863 authored by mercury233's avatar mercury233

fix

parent c07e578e
...@@ -55,9 +55,9 @@ namespace WindBot ...@@ -55,9 +55,9 @@ namespace WindBot
// YGOPRO_HOST // YGOPRO_HOST
// YGOPRO_PORT // YGOPRO_PORT
// YGOPRO_NAME // YGOPRO_NAME
// YGOPRO_DECK
// //
// List of variables optional: // List of variables optional:
// YGOPRO_DECK
// YGOPRO_VERSION // YGOPRO_VERSION
// YGOPRO_DIALOG // YGOPRO_DIALOG
// YGOPRO_PASSWORD // YGOPRO_PASSWORD
...@@ -126,9 +126,10 @@ namespace WindBot ...@@ -126,9 +126,10 @@ namespace WindBot
using (HttpListener MainServer = new HttpListener()) using (HttpListener MainServer = new HttpListener())
{ {
MainServer.AuthenticationSchemes = AuthenticationSchemes.Anonymous; MainServer.AuthenticationSchemes = AuthenticationSchemes.Anonymous;
MainServer.Prefixes.Add("http://127.0.0.1:2399/"); MainServer.Prefixes.Add("http://127.0.0.1:" + ServerPort + "/");
MainServer.Start(); MainServer.Start();
Logger.WriteLine("Windbot Server Start Successed."); Logger.WriteLine("Windbot Server Start Successed.");
Logger.WriteLine("HTTP GET http://127.0.0.1:" + ServerPort + "/?name=Windbot&host=127.0.0.1&port=7911 to call the bot.");
while (true) while (true)
{ {
try try
...@@ -153,7 +154,7 @@ namespace WindBot ...@@ -153,7 +154,7 @@ namespace WindBot
if (password != null) if (password != null)
Info.HostInfo = password; Info.HostInfo = password;
if (Info.Name == null || Info.Deck == null || Info.Host == null || port == null) if (Info.Name == null || Info.Host == null || port == null)
{ {
ctx.Response.StatusCode = 400; ctx.Response.StatusCode = 400;
ctx.Response.Close(); ctx.Response.Close();
...@@ -211,13 +212,7 @@ namespace WindBot ...@@ -211,13 +212,7 @@ namespace WindBot
} }
} }
Logger.DebugWriteLine(client.Username + " end."); Logger.DebugWriteLine(client.Username + " end.");
//System.Threading.Thread.CurrentThread.Abort();
} }
//catch (ThreadAbortException)
//{
//if (DebugMode)
// throw ex;
//}
catch (Exception ex) catch (Exception ex)
{ {
if (!DebugMode) if (!DebugMode)
......
...@@ -15,7 +15,7 @@ namespace WindBot ...@@ -15,7 +15,7 @@ namespace WindBot
public WindBotInfo() public WindBotInfo()
{ {
Name = "WindBot"; Name = "WindBot";
Deck = "Blue-Eyes"; Deck = null;
Dialog = "default"; Dialog = "default";
Host = "127.0.0.1"; Host = "127.0.0.1";
Port = 7911; Port = 7911;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment