I was never smart enough to recode this from the Open C source that Alugi made, instead i decompiled the Reality.Net.Dll from the PR guys and copied thier sources. Since this was created by using the Alugi open source code, i didnt see an harm in this. If anyone an issue with this, they can email me directly @ [email protected].
Пример #1
0
        /// <summary>
        /// Takes a message sent through the Stream and sends back a response
        /// </summary>
        /// <param name="message"></param>
        protected void ParseRequest(string message)
        {
            string[] data = message.Split(new char[] { '\x00' }, StringSplitOptions.RemoveEmptyEntries);

            //string gamename = data[1].ToLowerInvariant();
            string validate = data[2].Substring(0, 8);
            string filter   = FixFilter(data[2].Substring(8));

            string[] fields = data[3].Split(new char[] { '\\' }, StringSplitOptions.RemoveEmptyEntries);

            // Send the encrypted serverlist to the client
            byte[] unencryptedServerList = PackServerList(filter, fields);
            Stream.SendAsync(
                Enctypex.Encode(
                    Encoding.UTF8.GetBytes("hW6m9a"), // Battlfield 2 Handoff Key
                    Encoding.UTF8.GetBytes(validate),
                    unencryptedServerList,
                    unencryptedServerList.LongLength
                    )
                );
        }