Esempio n. 1
0
        public static byte[] OpChange(UserObject userobj)
        {
            AresTCPPacketWriter packet = new AresTCPPacketWriter();

            packet.WriteByte(userobj.Level > 0 ? (byte)1 : (byte)0);
            packet.WriteByte(0);
            return(packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_OPCHANGE));
        }
Esempio n. 2
0
        public static byte[] MyFeatures(UserObject userobj)
        {
            AresTCPPacketWriter packet = new AresTCPPacketWriter();

            packet.WriteString(Settings.VERSION);
            packet.WriteByte(7);
            packet.WriteByte(63);
            packet.WriteByte((byte)Settings.Get <ushort>("lenguage"));
            packet.WriteUInt32(userobj.Cookie);
            packet.WriteByte(1);
            return(packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_MYFEATURES));
        }
Esempio n. 3
0
        public static byte[] UserListEnd()
        {
            AresTCPPacketWriter packet = new AresTCPPacketWriter();

            packet.WriteByte(0);
            return(packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_CHANNEL_USER_LIST_END));
        }
Esempio n. 4
0
        public static byte[] UpdateUserStatus(UserObject client, UserObject target)
        {
            AresTCPPacketWriter packet = new AresTCPPacketWriter();

            packet.WriteString(client, target.Name);
            packet.WriteUInt16(target.FileCount);
            packet.WriteByte((byte)(0));
            packet.WriteIP(target.NodeIP);
            packet.WriteUInt16(target.NodePort);
            packet.WriteIP("0.0.0.0");
            packet.WriteByte((byte)target.Level);
            packet.WriteByte(target.Age);
            packet.WriteByte(target.Sex);
            packet.WriteByte(target.Country);
            packet.WriteString(client, target.Location);
            return(packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_UPDATE_USER_STATUS));
        }
Esempio n. 5
0
        public static byte[] UpdateUserStatus(UserObject userobj)
        {
            AresTCPPacketWriter packet = new AresTCPPacketWriter();

            packet.WriteString(userobj.Name);
            packet.WriteUInt16(userobj.FileCount);
            packet.WriteByte(userobj.CanBrowse ? (byte)1 : (byte)0);
            packet.WriteIP(userobj.NodeIP);
            packet.WriteUInt16(userobj.NodePort);
            packet.WriteIP(userobj.ExternalIP);
            packet.WriteByte(userobj.Level);
            packet.WriteByte(userobj.Age);
            packet.WriteByte(userobj.Sex);
            packet.WriteByte(userobj.Country);
            packet.WriteString(userobj.Location);
            return(packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_UPDATE_USER_STATUS));
        }
Esempio n. 6
0
        public static byte[] UserListItem(UserObject userobj)
        {
            AresTCPPacketWriter packet = new AresTCPPacketWriter();

            packet.WriteUInt16(userobj.FileCount);
            packet.WriteUInt32(0);
            packet.WriteIP(userobj.ExternalIP);
            packet.WriteUInt16(userobj.Port);
            packet.WriteIP(userobj.NodeIP);
            packet.WriteUInt16(userobj.NodePort);
            packet.WriteByte(0);
            packet.WriteString(userobj.Name);
            packet.WriteIP(userobj.LocalIP);
            packet.WriteByte(userobj.CanBrowse ? (byte)1 : (byte)0);
            packet.WriteByte(userobj.Level);
            packet.WriteByte(userobj.Age);
            packet.WriteByte(userobj.Sex);
            packet.WriteByte(userobj.Country);
            packet.WriteString(userobj.Location);
            return(packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_CHANNEL_USER_LIST));
        }
Esempio n. 7
0
        public static byte[] UserListBotItem()
        {
            AresTCPPacketWriter packet = new AresTCPPacketWriter();

            packet.WriteUInt16(0);
            packet.WriteUInt32(0);
            packet.WriteIP(System.Net.IPAddress.Parse("0.0.0.0"));
            packet.WriteUInt16(0);
            packet.WriteIP(System.Net.IPAddress.Parse("0.0.0.0"));
            packet.WriteUInt16(0);
            packet.WriteByte(0);
            packet.WriteString(Settings.Get <String>("bot"));
            packet.WriteIP(System.Net.IPAddress.Parse("0.0.0.0"));
            packet.WriteByte(0);
            packet.WriteByte(3);
            packet.WriteByte(0);
            packet.WriteByte(0);
            packet.WriteByte(0);
            packet.WriteString(String.Empty);
            return(packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_CHANNEL_USER_LIST));
        }