Esempio n. 1
0
        /// <summary>
        /// Client has requested the MOTD
        /// </summary>
        /// <param name="clientRequest"></param>
        private void HandleMOTDRequest(InboundPacket clientRequest)
        {
            ConnectionLog("SENDING MOTD");

            // Response packet contains the MOTD string
            OutboundPacket MOTD = new OutboundPacket(MasterServer.GetMOTD(locale, true));

            // Send the MR_OptionalUpgrade value if this connection is valid but player is an outdated version
            if (outerConnection.Version < Protocol.OPTIONALUPGRADE_VERSION)
            {
                MOTD.Append(Protocol.OPTIONALUPGRADE_VERSION);
            }

            // Send the MOTD packet
            Send(MOTD);
        }