예제 #1
0
파일: Client.cs 프로젝트: umby24/ZBase
 /// <summary>
 /// Sends a proper kick to the client, and disconnects them.
 /// </summary>
 /// <param name="reason">The reason for the kick.</param>
 public void Kick(string reason)
 {
     SendPacket(PacketCreator.CreateDisconnect(reason));
     Logger.Log(LogType.Info, Verified ? $"{ClientPlayer.Name} kicked. ({reason})" : $"{Ip} kicked. ({reason})");
     _disconnectOnSend = true;
     //    Shutdown();
 }
예제 #2
0
파일: Client.cs 프로젝트: umby24/ZBase
 public void SendHandshake(bool op, string motd = null)
 {
     SendPacket(PacketCreator.CreateHandshake(
                    Server.ProtocolVersion,
                    (byte)(op ? 100 : 0),
                    Configuration.Settings.General.Name,
                    motd ?? Configuration.Settings.General.Motd
                    )); // -- Send the handshake (acknowledgement)
 }