From ba964b8e66fbf3f0fdfd5a568934e68a7cccc5dc Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Tue, 22 Dec 2020 00:41:58 +0000 Subject: [PATCH] More rework --- COAN/COAN.csproj | 1 - COAN/Network/Network.cs | 13 ------------- COAN/Network/NetworkClient.cs | 8 +++----- 3 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 COAN/Network/Network.cs diff --git a/COAN/COAN.csproj b/COAN/COAN.csproj index 7e4234d..aeb0fd5 100644 --- a/COAN/COAN.csproj +++ b/COAN/COAN.csproj @@ -84,7 +84,6 @@ - diff --git a/COAN/Network/Network.cs b/COAN/Network/Network.cs deleted file mode 100644 index cfa61ee..0000000 --- a/COAN/Network/Network.cs +++ /dev/null @@ -1,13 +0,0 @@ -using NLog; - -namespace COAN -{ - public class Network - { - public static Logger logger = LogManager.GetCurrentClassLogger(); - - public Network() - { - } - } -} diff --git a/COAN/Network/NetworkClient.cs b/COAN/Network/NetworkClient.cs index 575a9fd..66edea1 100644 --- a/COAN/Network/NetworkClient.cs +++ b/COAN/Network/NetworkClient.cs @@ -63,12 +63,11 @@ public NetworkClient() public void Disconnect() { socket.Close(); - //mThread.Abort(); } public bool Connect(string hostname, int port, string password) { - this.adminPassword = password; + adminPassword = password; if (adminPassword.Length == 0 || hostname.Length == 0) { var errorMessage = "Can't connect with empty "; @@ -86,9 +85,7 @@ public bool Connect(string hostname, int port, string password) MessageBox.Show(errorMessage); return false; } - //this.adminHost = hostname; - //this.adminPort = port; - // + try { @@ -209,6 +206,7 @@ public void pollDate() public void sendAdminJoin() { + logger.Log(LogLevel.Trace, string.Format("sendAdminJoin - adminPassword: {0} | botName: {1} | botVersion: {2}", adminPassword, botName, botVersion)); Packet p = new Packet(getSocket(), PacketType.ADMIN_PACKET_ADMIN_JOIN); p.WriteString(adminPassword);