/// <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(); }
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) }