Exemplo n.º 1
0
        private static void AddOrUpdateServer(GameManagement.ServerPersister.ServerData servdata)
        {
            var existing = ServerList.FirstOrDefault(s => s.IsEqual(servdata));

            if (existing != null)
            {
                existing.ServerName        = servdata.ServerName;
                existing.ServerDescription = servdata.ServerDesc;
                existing.ServerIpAndPort   = servdata.ConnectionString;
                existing.RodatSetting      = servdata.RodatSetting;
                existing.VisibilitySetting = servdata.VisibilitySetting;
                existing.EMU = servdata.EMU;
            }
            else
            {
                ServerModel model = ServerModel.Create(servdata);
                ServerList.Add(model);
            }
        }
Exemplo n.º 2
0
 internal static void AddNewServer(GameManagement.ServerPersister.ServerData servdata)
 {
     AddOrUpdateServer(servdata);
     SaveServerListToDisk();
 }
        private bool IsInOurServers(GameManagement.ServerPersister.ServerData srvdata)
        {
            var result = ServerManager.ServerList.FirstOrDefault(z => z.IsEqual(srvdata));

            return(result != null);
        }