public void Ban(uint cid, string message)
 {
     /* f0be4501577a75005b0000000200000000000000f8bd354f54000000000011596572206120747572642c20647564652e060000000d000000b870b602 */
     /*  */
     TS2Packet packet = new TS2Packet();
     packet.Create(TS2.STANDARD, TS2.BANPLAYER, this.SessionKey, this.ClientID, this.SequenceNumber);
     packet.Raw(packet.combine(BitConverter.GetBytes(cid), new byte[] { 0x00, 0x00, (byte)message.Length }, packet.Pad(message, 29)));
     net.Send(packet.toByteArray(), Target);
 }
        public void SendMessage(uint target, string message, int opt)
        {
            TS2Packet packet = new TS2Packet();
            packet.Create(TS2.STANDARD, TS2.MSGPLAYER, this.SessionKey, this.ClientID, this.SequenceNumber);

            switch (opt)
            {
                case 2: /* player */
                    packet.Raw(packet.combine(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x02 }, BitConverter.GetBytes(target), packet.Pad(message, message.Length + 1)));
                    break;
                case 1: /* channel */
                    packet.Raw(packet.combine(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x01 }, BitConverter.GetBytes(target), packet.Pad(message, message.Length + 1)));
                    break;
                case 0: /* server */
                    packet.Raw(packet.combine(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, packet.Pad(message, message.Length + 1)));
                    break;
            }

            net.Send(packet.toByteArray(), Target);
        }
 public void ServerAdmin(uint cid, bool give)
 {
     /* f0be3301a54c3d003f00000002000000000000005f718a7e0e0000000000 */
     /* f0be3301ce8f36003f000000020000000000000006ef023b0e0000000000 */
     /* f0be3301ffe32500450000000200000000000000630e5b4c0e0000000200 */
     TS2Packet packet = new TS2Packet();
     ushort action = give ? (ushort)0x0000 : (ushort)0x0002;
     packet.Create(TS2.STANDARD, TS2.GIVESA, this.SessionKey, this.ClientID, this.SequenceNumber);
     packet.Raw(packet.combine(BitConverter.GetBytes(cid), BitConverter.GetBytes(action)));
     net.Send(packet.toByteArray(), Target);
 }