public void ServerWrite(IWriteMessage outMsg, Client c)
        {
            outMsg.Write(ServerName);
            outMsg.Write(ServerMessageText);
            outMsg.Write((byte)MaxPlayers);
            outMsg.Write(HasPassword);
            outMsg.Write(IsPublic);
            outMsg.WritePadBits();
            outMsg.WriteRangedInteger(TickRate, 1, 60);

            WriteExtraCargo(outMsg);

            Voting.ServerWrite(outMsg);

            if (c.HasPermission(Networking.ClientPermissions.ManageSettings))
            {
                outMsg.Write(true);
                outMsg.WritePadBits();

                ServerAdminWrite(outMsg, c);
            }
            else
            {
                outMsg.Write(false);
                outMsg.WritePadBits();
            }
        }
示例#2
0
        public void ServerWrite(NetBuffer outMsg, Client c)
        {
            outMsg.Write(ServerName);
            outMsg.Write(ServerMessageText);
            outMsg.WriteRangedInteger(1, 60, TickRate);

            WriteExtraCargo(outMsg);

            Voting.ServerWrite(outMsg);

            if (c.HasPermission(Networking.ClientPermissions.ManageSettings))
            {
                outMsg.Write(true);
                outMsg.WritePadBits();

                ServerAdminWrite(outMsg, c);
            }
            else
            {
                outMsg.Write(false);
                outMsg.WritePadBits();
            }
        }