public static void print_prefabs(Arg arg) { PrefabPoolCollection pool = GameManager.server.pool; if (pool.storage.Count == 0) { arg.ReplyWith("Prefab pool is empty."); return; } string @string = arg.GetString(0, string.Empty); TextTable textTable = new TextTable(); textTable.AddColumn("id"); textTable.AddColumn("name"); textTable.AddColumn("count"); foreach (KeyValuePair <uint, PrefabPool> item in pool.storage) { string text = item.Key.ToString(); string text2 = StringPool.Get(item.Key); string text3 = item.Value.Count.ToString(); if (string.IsNullOrEmpty(@string) || text2.Contains(@string, CompareOptions.IgnoreCase)) { textTable.AddRow(text, Path.GetFileNameWithoutExtension(text2), text3); } } arg.ReplyWith(textTable.ToString()); }
public static void print_assets(ConsoleSystem.Arg arg) { if (AssetPool.storage.Count == 0) { arg.ReplyWith("Asset pool is empty."); return; } string str = arg.GetString(0, string.Empty); TextTable textTable = new TextTable(); textTable.AddColumn("type"); textTable.AddColumn("allocated"); textTable.AddColumn("available"); foreach (KeyValuePair <Type, AssetPool.Pool> keyValuePair in AssetPool.storage) { string str1 = keyValuePair.Key.ToString(); string str2 = keyValuePair.Value.allocated.ToString(); string str3 = keyValuePair.Value.available.ToString(); if (!string.IsNullOrEmpty(str) && !str1.Contains(str, CompareOptions.IgnoreCase)) { continue; } textTable.AddRow(new string[] { str1, str2, str3 }); } arg.ReplyWith(textTable.ToString()); }
public static void print_assets(Arg arg) { if (AssetPool.storage.Count == 0) { arg.ReplyWith("Asset pool is empty."); return; } string @string = arg.GetString(0, string.Empty); TextTable textTable = new TextTable(); textTable.AddColumn("type"); textTable.AddColumn("allocated"); textTable.AddColumn("available"); foreach (KeyValuePair <Type, AssetPool.Pool> item in AssetPool.storage) { string text = item.Key.ToString(); string text2 = item.Value.allocated.ToString(); string text3 = item.Value.available.ToString(); if (string.IsNullOrEmpty(@string) || text.Contains(@string, CompareOptions.IgnoreCase)) { textTable.AddRow(text, text2, text3); } } arg.ReplyWith(textTable.ToString()); }
public static void scalars(ConsoleSystem.Arg args) { TextTable textTable = new TextTable(); textTable.AddColumn("Type"); textTable.AddColumn("Value"); string[] str = new string[] { "Player Fraction", null }; float single = SpawnHandler.PlayerFraction(); str[1] = single.ToString(); textTable.AddRow(str); string[] strArrays = new string[] { "Player Excess", null }; single = SpawnHandler.PlayerExcess(); strArrays[1] = single.ToString(); textTable.AddRow(strArrays); string[] str1 = new string[] { "Population Rate", null }; single = SpawnHandler.PlayerLerp(Spawn.min_rate, Spawn.max_rate); str1[1] = single.ToString(); textTable.AddRow(str1); string[] strArrays1 = new string[] { "Population Density", null }; single = SpawnHandler.PlayerLerp(Spawn.min_density, Spawn.max_density); strArrays1[1] = single.ToString(); textTable.AddRow(strArrays1); string[] str2 = new string[] { "Group Rate", null }; single = SpawnHandler.PlayerScale(Spawn.player_scale); str2[1] = single.ToString(); textTable.AddRow(str2); args.ReplyWith(textTable.ToString()); }
public static string teaminfo(Arg arg) { ulong num = arg.GetUInt64(0, 0uL); if (num == 0L) { BasePlayer player = ArgEx.GetPlayer(arg, 0); if (player == null) { return("Player not found"); } num = player.userID; } RelationshipManager.PlayerTeam playerTeam = RelationshipManager.ServerInstance.FindPlayersTeam(num); if (playerTeam == null) { return("Player is not in a team"); } TextTable textTable = new TextTable(); textTable.AddColumn("steamID"); textTable.AddColumn("username"); textTable.AddColumn("online"); textTable.AddColumn("leader"); foreach (ulong memberId in playerTeam.members) { bool flag = Network.Net.sv.connections.FirstOrDefault((Connection c) => c.connected && c.userid == memberId) != null; textTable.AddRow(memberId.ToString(), GetPlayerName(memberId), flag ? "x" : "", (memberId == playerTeam.teamLeader) ? "x" : ""); } return(textTable.ToString()); }
public static void subscriptions(ConsoleSystem.Arg arg) { TextTable textTable = new TextTable(); textTable.AddColumn("realm"); textTable.AddColumn("group"); BasePlayer basePlayer = arg.Player(); if (Object.op_Implicit((Object)basePlayer)) { using (List <Group> .Enumerator enumerator = ((List <Group>)((Subscriber)basePlayer.net.subscriber).subscribed).GetEnumerator()) { while (enumerator.MoveNext()) { Group current = enumerator.Current; // ISSUE: explicit non-virtual call textTable.AddRow(new string[2] { "sv", __nonvirtual(current.ID.ToString()) }); } } } arg.ReplyWith(((object)textTable).ToString()); }
public static void print_approved_skins(ConsoleSystem.Arg arg) { if (!SteamServer.IsValid) { return; } if (SteamInventory.Definitions == null) { return; } TextTable textTable = new TextTable(); textTable.AddColumn("name"); textTable.AddColumn("itemshortname"); textTable.AddColumn("workshopid"); textTable.AddColumn("workshopdownload"); InventoryDef[] definitions = SteamInventory.Definitions; for (int i = 0; i < (int)definitions.Length; i++) { InventoryDef inventoryDef = definitions[i]; string name = inventoryDef.Name; string property = inventoryDef.GetProperty("itemshortname"); string str = inventoryDef.GetProperty("workshopid"); string property1 = inventoryDef.GetProperty("workshopdownload"); textTable.AddRow(new string[] { name, property, str, property1 }); } arg.ReplyWith(textTable.ToString()); }
public static void print_prefabs(ConsoleSystem.Arg arg) { PrefabPoolCollection pool = GameManager.server.pool; if (pool.storage.Count == 0) { arg.ReplyWith("Prefab pool is empty."); } else { string str1 = arg.GetString(0, string.Empty); TextTable textTable = new TextTable(); textTable.AddColumn("id"); textTable.AddColumn("name"); textTable.AddColumn("count"); foreach (KeyValuePair <uint, PrefabPool> keyValuePair in pool.storage) { string str2 = keyValuePair.Key.ToString(); string path = StringPool.Get(keyValuePair.Key); string str3 = keyValuePair.Value.Count.ToString(); if (string.IsNullOrEmpty(str1) || StringEx.Contains(path, str1, CompareOptions.IgnoreCase)) { textTable.AddRow(new string[3] { str2, Path.GetFileNameWithoutExtension(path), str3 }); } } arg.ReplyWith(((object)textTable).ToString()); } }
public static void print_approved_skins(ConsoleSystem.Arg arg) { if (Global.get_SteamServer() == null || ((BaseSteamworks)Global.get_SteamServer()).get_Inventory().Definitions == null) { return; } TextTable textTable = new TextTable(); textTable.AddColumn("name"); textTable.AddColumn("itemshortname"); textTable.AddColumn("workshopid"); textTable.AddColumn("workshopdownload"); foreach (Inventory.Definition definition in (Inventory.Definition[])((BaseSteamworks)Global.get_SteamServer()).get_Inventory().Definitions) { string name = definition.get_Name(); string stringProperty1 = definition.GetStringProperty("itemshortname"); string stringProperty2 = definition.GetStringProperty("workshopid"); string stringProperty3 = definition.GetStringProperty("workshopdownload"); textTable.AddRow(new string[4] { name, stringProperty1, stringProperty2, stringProperty3 }); } arg.ReplyWith(((object)textTable).ToString()); }
public static void scalars(ConsoleSystem.Arg args) { TextTable textTable = new TextTable(); textTable.AddColumn("Type"); textTable.AddColumn("Value"); textTable.AddRow(new string[2] { "Player Fraction", SpawnHandler.PlayerFraction().ToString() }); textTable.AddRow(new string[2] { "Player Excess", SpawnHandler.PlayerExcess().ToString() }); textTable.AddRow(new string[2] { "Population Rate", SpawnHandler.PlayerLerp(Spawn.min_rate, Spawn.max_rate).ToString() }); textTable.AddRow(new string[2] { "Population Density", SpawnHandler.PlayerLerp(Spawn.min_density, Spawn.max_density).ToString() }); textTable.AddRow(new string[2] { "Group Rate", SpawnHandler.PlayerScale(Spawn.player_scale).ToString() }); args.ReplyWith(((object)textTable).ToString()); }
public static string packetlog(Arg arg) { if (!packetlog_enabled) { return("Packet log is not enabled."); } List <Tuple <Message.Type, ulong> > list = new List <Tuple <Message.Type, ulong> >(); foreach (KeyValuePair <Message.Type, TimeAverageValue> item in SingletonComponent <ServerMgr> .Instance.packetHistory.dict) { list.Add(new Tuple <Message.Type, ulong>(item.Key, item.Value.Calculate())); } TextTable textTable = new TextTable(); textTable.AddColumn("type"); textTable.AddColumn("calls"); foreach (Tuple <Message.Type, ulong> item2 in list.OrderByDescending((Tuple <Message.Type, ulong> entry) => entry.Item2)) { if (item2.Item2 == 0L) { break; } string text = item2.Item1.ToString(); string text2 = item2.Item2.ToString(); textTable.AddRow(text, text2); } return(textTable.ToString()); }
public static string rpclog(Arg arg) { if (!rpclog_enabled) { return("RPC log is not enabled."); } List <Tuple <uint, ulong> > list = new List <Tuple <uint, ulong> >(); foreach (KeyValuePair <uint, TimeAverageValue> item in SingletonComponent <ServerMgr> .Instance.rpcHistory.dict) { list.Add(new Tuple <uint, ulong>(item.Key, item.Value.Calculate())); } TextTable textTable = new TextTable(); textTable.AddColumn("id"); textTable.AddColumn("name"); textTable.AddColumn("calls"); foreach (Tuple <uint, ulong> item2 in list.OrderByDescending((Tuple <uint, ulong> entry) => entry.Item2)) { if (item2.Item2 == 0L) { break; } string text = item2.Item1.ToString(); string text2 = StringPool.Get(item2.Item1); string text3 = item2.Item2.ToString(); textTable.AddRow(text, text2, text3); } return(textTable.ToString()); }
public static void print_prefabs(ConsoleSystem.Arg arg) { PrefabPoolCollection prefabPoolCollection = GameManager.server.pool; if (prefabPoolCollection.storage.Count == 0) { arg.ReplyWith("Prefab pool is empty."); return; } string str = arg.GetString(0, string.Empty); TextTable textTable = new TextTable(); textTable.AddColumn("id"); textTable.AddColumn("name"); textTable.AddColumn("count"); foreach (KeyValuePair <uint, PrefabPool> keyValuePair in prefabPoolCollection.storage) { string str1 = keyValuePair.Key.ToString(); string str2 = StringPool.Get(keyValuePair.Key); string str3 = keyValuePair.Value.Count.ToString(); if (!string.IsNullOrEmpty(str) && !str2.Contains(str, CompareOptions.IgnoreCase)) { continue; } textTable.AddRow(new string[] { str1, Path.GetFileNameWithoutExtension(str2), str3 }); } arg.ReplyWith(textTable.ToString()); }
public static void scalars(Arg args) { TextTable textTable = new TextTable(); textTable.AddColumn("Type"); textTable.AddColumn("Value"); textTable.AddRow("Player Fraction", SpawnHandler.PlayerFraction().ToString()); textTable.AddRow("Player Excess", SpawnHandler.PlayerExcess().ToString()); textTable.AddRow("Population Rate", SpawnHandler.PlayerLerp(min_rate, max_rate).ToString()); textTable.AddRow("Population Density", SpawnHandler.PlayerLerp(min_density, max_density).ToString()); textTable.AddRow("Group Rate", SpawnHandler.PlayerScale(player_scale).ToString()); args.ReplyWith(textTable.ToString()); }
public static void aiDebug_LoadBalanceOverdueReportServer(ConsoleSystem.Arg args) { TextTable table = new TextTable(); table.AddColumn("type"); table.AddColumn("count"); table.AddColumn("overdue"); ConVar.AI.AddLBTableEntry(ref table, "Default", LoadBalancer.defaultBalancer as LoadBalancedQueue); ConVar.AI.AddLBTableEntry(ref table, "Ai Manager", AiManagerLoadBalancer.aiManagerLoadBalancer as LoadBalancedQueue); ConVar.AI.AddLBTableEntry(ref table, "Ai Behaviour", AILoadBalancer.aiLoadBalancer as LoadBalancedQueue); ConVar.AI.AddLBTableEntry(ref table, "Npc Senses", NPCSensesLoadBalancer.NpcSensesLoadBalancer as LoadBalancedQueue); ConVar.AI.AddLBTableEntry(ref table, "Animal Senses", AnimalSensesLoadBalancer.animalSensesLoadBalancer as LoadBalancedQueue); args.ReplyWith(((object)table).ToString()); }
public static void status(Arg arg) { string @string = arg.GetString(0); string text = string.Empty; if (@string.Length == 0) { text = text + "hostname: " + Server.hostname + "\n"; text = text + "version : " + 2306 + " secure (secure mode enabled, connected to Steam3)\n"; text = text + "map : " + Server.level + "\n"; text += $"players : {BasePlayer.activePlayerList.Count()} ({Server.maxplayers} max) ({SingletonComponent<ServerMgr>.Instance.connectionQueue.Queued} queued) ({SingletonComponent<ServerMgr>.Instance.connectionQueue.Joining} joining)\n\n"; } TextTable textTable = new TextTable(); textTable.AddColumn("id"); textTable.AddColumn("name"); textTable.AddColumn("ping"); textTable.AddColumn("connected"); textTable.AddColumn("addr"); textTable.AddColumn("owner"); textTable.AddColumn("violation"); textTable.AddColumn("kicks"); foreach (BasePlayer activePlayer in BasePlayer.activePlayerList) { try { if (!BaseEntityEx.IsValid(activePlayer)) { continue; } string userIDString = activePlayer.UserIDString; if (activePlayer.net.connection == null) { textTable.AddRow(userIDString, "NO CONNECTION"); continue; } string text2 = activePlayer.net.connection.ownerid.ToString(); string text3 = activePlayer.displayName.QuoteSafe(); string text4 = Network.Net.sv.GetAveragePing(activePlayer.net.connection).ToString(); string text5 = activePlayer.net.connection.ipaddress; string text6 = activePlayer.violationLevel.ToString("0.0"); string text7 = activePlayer.GetAntiHackKicks().ToString(); if (!arg.IsAdmin && !arg.IsRcon) { text5 = "xx.xxx.xx.xxx"; } string text8 = activePlayer.net.connection.GetSecondsConnected() + "s"; if (@string.Length <= 0 || text3.Contains(@string, CompareOptions.IgnoreCase) || userIDString.Contains(@string) || text2.Contains(@string) || text5.Contains(@string)) { textTable.AddRow(userIDString, text3, text4, text8, text5, (text2 == userIDString) ? string.Empty : text2, text6, text7); } } catch (Exception ex) { textTable.AddRow(activePlayer.UserIDString, ex.Message.QuoteSafe()); } } arg.ReplyWith(text + textTable.ToString()); }
public static void subscriptions(Arg arg) { TextTable textTable = new TextTable(); textTable.AddColumn("realm"); textTable.AddColumn("group"); BasePlayer basePlayer = ArgEx.Player(arg); if ((bool)basePlayer) { foreach (Group item in basePlayer.net.subscriber.subscribed) { textTable.AddRow("sv", item.ID.ToString()); } } arg.ReplyWith(textTable.ToString()); }
public static void monuments(Arg arg) { if (!TerrainMeta.Path) { return; } TextTable textTable = new TextTable(); textTable.AddColumn("type"); textTable.AddColumn("name"); textTable.AddColumn("pos"); foreach (MonumentInfo monument in TerrainMeta.Path.Monuments) { textTable.AddRow(monument.Type.ToString(), monument.name, monument.transform.position.ToString()); } arg.ReplyWith(textTable.ToString()); }
public static void subscriptions(ConsoleSystem.Arg arg) { TextTable textTable = new TextTable(); textTable.AddColumn("realm"); textTable.AddColumn("group"); BasePlayer basePlayer = arg.Player(); if (basePlayer) { foreach (Group group in basePlayer.net.subscriber.subscribed) { textTable.AddRow(new string[] { "sv", group.ID.ToString() }); } } arg.ReplyWith(textTable.ToString()); }
public static void players(ConsoleSystem.Arg arg) { TextTable textTable = new TextTable(); textTable.AddColumn("id"); textTable.AddColumn("name"); textTable.AddColumn("ping"); textTable.AddColumn("snap"); textTable.AddColumn("updt"); textTable.AddColumn("posi"); textTable.AddColumn("dist"); foreach (BasePlayer basePlayer in BasePlayer.activePlayerList) { string userIDString = basePlayer.UserIDString; string str = basePlayer.displayName.ToString(); if (str.Length >= 14) { str = string.Concat(str.Substring(0, 14), ".."); } string str1 = str; int averagePing = Network.Net.sv.GetAveragePing(basePlayer.net.connection); string str2 = averagePing.ToString(); string str3 = basePlayer.GetQueuedUpdateCount(BasePlayer.NetworkQueue.Update).ToString(); string str4 = basePlayer.GetQueuedUpdateCount(BasePlayer.NetworkQueue.UpdateDistance).ToString(); textTable.AddRow(new string[] { userIDString, str1, str2, string.Empty, str3, string.Empty, str4 }); } arg.ReplyWith(textTable.ToString()); }
public static void players(Arg arg) { TextTable textTable = new TextTable(); textTable.AddColumn("id"); textTable.AddColumn("name"); textTable.AddColumn("ping"); textTable.AddColumn("snap"); textTable.AddColumn("updt"); textTable.AddColumn("posi"); textTable.AddColumn("dist"); foreach (BasePlayer activePlayer in BasePlayer.activePlayerList) { string userIDString = activePlayer.UserIDString; string text = activePlayer.displayName.ToString(); if (text.Length >= 14) { text = text.Substring(0, 14) + ".."; } string text2 = text; string text3 = Network.Net.sv.GetAveragePing(activePlayer.net.connection).ToString(); string text4 = activePlayer.GetQueuedUpdateCount(BasePlayer.NetworkQueue.Update).ToString(); string text5 = activePlayer.GetQueuedUpdateCount(BasePlayer.NetworkQueue.UpdateDistance).ToString(); textTable.AddRow(userIDString, text2, text3, string.Empty, text4, string.Empty, text5); } arg.ReplyWith(textTable.ToString()); }
public static void monuments(ConsoleSystem.Arg arg) { if (!TerrainMeta.Path) { return; } TextTable textTable = new TextTable(); textTable.AddColumn("type"); textTable.AddColumn("name"); textTable.AddColumn("pos"); foreach (MonumentInfo monument in TerrainMeta.Path.Monuments) { string[] str = new string[] { monument.Type.ToString(), monument.name, null }; str[2] = monument.transform.position.ToString(); textTable.AddRow(str); } arg.ReplyWith(textTable.ToString()); }
private static string AuthList(BaseEntity ent) { if ((object)ent != null) { BuildingPrivlidge buildingPrivlidge; List <PlayerNameID> authorizedPlayers; if ((object)(buildingPrivlidge = ent as BuildingPrivlidge) == null) { AutoTurret autoTurret; if ((object)(autoTurret = ent as AutoTurret) == null) { CodeLock codeLock; if ((object)(codeLock = ent as CodeLock) != null) { return(CodeLockAuthList(codeLock)); } goto IL_0042; } authorizedPlayers = autoTurret.authorizedPlayers; } else { authorizedPlayers = buildingPrivlidge.authorizedPlayers; } if (authorizedPlayers == null || authorizedPlayers.Count == 0) { return("Nobody is authed to this entity"); } TextTable textTable = new TextTable(); textTable.AddColumn("steamID"); textTable.AddColumn("username"); foreach (PlayerNameID item in authorizedPlayers) { textTable.AddRow(item.userid.ToString(), GetPlayerName(item.userid)); } return(textTable.ToString()); } goto IL_0042; IL_0042: return("Entity has no auth list"); }
private static string CodeLockAuthList(CodeLock codeLock) { if (codeLock.whitelistPlayers.Count == 0 && codeLock.guestPlayers.Count == 0) { return("Nobody is authed to this entity"); } TextTable textTable = new TextTable(); textTable.AddColumn("steamID"); textTable.AddColumn("username"); textTable.AddColumn("isGuest"); foreach (ulong whitelistPlayer in codeLock.whitelistPlayers) { textTable.AddRow(whitelistPlayer.ToString(), GetPlayerName(whitelistPlayer), ""); } foreach (ulong guestPlayer in codeLock.guestPlayers) { textTable.AddRow(guestPlayer.ToString(), GetPlayerName(guestPlayer), "x"); } return(textTable.ToString()); }
public static void print_memory(ConsoleSystem.Arg arg) { if (Facepunch.Pool.directory.Count == 0) { arg.ReplyWith("Memory pool is empty."); return; } TextTable textTable = new TextTable(); textTable.AddColumn("type"); textTable.AddColumn("pooled"); textTable.AddColumn("active"); textTable.AddColumn("hits"); textTable.AddColumn("misses"); textTable.AddColumn("spills"); foreach (KeyValuePair <Type, Facepunch.Pool.ICollection> keyValuePair in from x in Facepunch.Pool.directory orderby x.Value.ItemsCreated descending select x) { string str = keyValuePair.Key.ToString().Replace("System.Collections.Generic.", ""); Facepunch.Pool.ICollection value = keyValuePair.Value; textTable.AddRow(new string[] { str, value.ItemsInStack.FormatNumberShort(), value.ItemsInUse.FormatNumberShort(), value.ItemsTaken.FormatNumberShort(), value.ItemsCreated.FormatNumberShort(), value.ItemsSpilled.FormatNumberShort() }); } arg.ReplyWith(textTable.ToString()); }
public static void print_approved_skins(Arg arg) { if (!PlatformService.Instance.IsValid || PlatformService.Instance.ItemDefinitions == null) { return; } TextTable textTable = new TextTable(); textTable.AddColumn("name"); textTable.AddColumn("itemshortname"); textTable.AddColumn("workshopid"); textTable.AddColumn("workshopdownload"); foreach (IPlayerItemDefinition itemDefinition in PlatformService.Instance.ItemDefinitions) { string name = itemDefinition.Name; string itemShortName = itemDefinition.ItemShortName; string text = itemDefinition.WorkshopId.ToString(); string text2 = itemDefinition.WorkshopDownload.ToString(); textTable.AddRow(name, itemShortName, text, text2); } arg.ReplyWith(textTable.ToString()); }
public static void monuments(ConsoleSystem.Arg arg) { if (!Object.op_Implicit((Object)TerrainMeta.Path)) { return; } TextTable textTable = new TextTable(); textTable.AddColumn("type"); textTable.AddColumn("name"); textTable.AddColumn("pos"); foreach (MonumentInfo monument in TerrainMeta.Path.Monuments) { textTable.AddRow(new string[3] { monument.Type.ToString(), ((Object)monument).get_name(), ((Component)monument).get_transform().get_position().ToString() }); } arg.ReplyWith(((object)textTable).ToString()); }
public static void report(Arg args) { if ((bool)SingletonComponent <Climate> .Instance) { TextTable textTable = new TextTable(); textTable.AddColumn(SingletonComponent <Climate> .Instance.WeatherStatePrevious.name); textTable.AddColumn("|"); textTable.AddColumn(SingletonComponent <Climate> .Instance.WeatherStateTarget.name); textTable.AddColumn("|"); textTable.AddColumn(SingletonComponent <Climate> .Instance.WeatherStateNext.name); int num = Mathf.RoundToInt(SingletonComponent <Climate> .Instance.WeatherStateBlend * 100f); if (num < 100) { textTable.AddRow("fading out (" + (100 - num) + "%)", "|", "fading in (" + num + "%)", "|", "up next"); } else { textTable.AddRow("previous", "|", "current", "|", "up next"); } args.ReplyWith(textTable.ToString() + Environment.NewLine + SingletonComponent <Climate> .Instance.WeatherState.ToString()); } }
public static void print_assets(ConsoleSystem.Arg arg) { if (((Dictionary <System.Type, AssetPool.Pool>)AssetPool.storage).Count == 0) { arg.ReplyWith("Asset pool is empty."); } else { string str1 = arg.GetString(0, string.Empty); TextTable textTable = new TextTable(); textTable.AddColumn("type"); textTable.AddColumn("allocated"); textTable.AddColumn("available"); using (Dictionary <System.Type, AssetPool.Pool> .Enumerator enumerator = ((Dictionary <System.Type, AssetPool.Pool>)AssetPool.storage).GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <System.Type, AssetPool.Pool> current = enumerator.Current; string str2 = current.Key.ToString(); // ISSUE: explicit non-virtual call string str3 = __nonvirtual(current.Value.allocated.ToString()); // ISSUE: explicit non-virtual call string str4 = __nonvirtual(current.Value.available.ToString()); if (string.IsNullOrEmpty(str1) || StringEx.Contains(str2, str1, CompareOptions.IgnoreCase)) { textTable.AddRow(new string[3] { str2, str3, str4 }); } } } arg.ReplyWith(((object)textTable).ToString()); } }
public static void players(ConsoleSystem.Arg arg) { TextTable textTable = new TextTable(); textTable.AddColumn("id"); textTable.AddColumn("name"); textTable.AddColumn("ping"); textTable.AddColumn("snap"); textTable.AddColumn("updt"); textTable.AddColumn("posi"); textTable.AddColumn("dist"); foreach (BasePlayer activePlayer in BasePlayer.activePlayerList) { string userIdString = activePlayer.UserIDString; string str1 = activePlayer.displayName.ToString(); if (str1.Length >= 14) { str1 = str1.Substring(0, 14) + ".."; } string str2 = str1; int num = ((Server)Net.sv).GetAveragePing(activePlayer.net.get_connection()); string str3 = num.ToString(); num = activePlayer.GetQueuedUpdateCount(BasePlayer.NetworkQueue.Update); string str4 = num.ToString(); num = activePlayer.GetQueuedUpdateCount(BasePlayer.NetworkQueue.UpdateDistance); string str5 = num.ToString(); textTable.AddRow(new string[7] { userIdString, str2, str3, string.Empty, str4, string.Empty, str5 }); } arg.ReplyWith(((object)textTable).ToString()); }