/// <summary> /// Checks to see if this lobby member is equal to another. Only the SteamID of the lobby member is taken into account. /// </summary> /// <param name="obj"></param> /// <returns>true, if obj is <see cref="Member"/> with a matching SteamID. Otherwise, false.</returns> public override bool Equals(object obj) { if (obj is Member member) { return(SteamID.Equals(member.SteamID)); } return(false); }
/// <summary> /// Updates a map in the maplist, and keeps the position in the array /// </summary> /// <param name="maptochange"></param> /// <param name="map"></param> /// <param name="downloadurl"></param> /// <param name="notes"></param> /// <param name="sender"></param> /// <returns></returns> public string ImpEntryUpdate(string maptochange, string map, string downloadurl, string notes, SteamID sender) { Log.Interface("Reached Here"); if (notes == null) { notes = "No Notes"; } int EntryCount = 0; if (admincheck(sender) == true | sender.Equals(Maplist[maptochange].Item2)) { foreach (KeyValuePair<string, Tuple<string, string, string, bool>> entry in Maplist) { EntryCount = EntryCount + 1; if (entry.Key == maptochange) { UpdateEntryExecute(EntryCount, maptochange, map, downloadurl, notes, sender.ToString()); return "Map has been updated"; } } } return "The entry was not found"; }
public void ignoredTrade(SteamID steamID) { if (currentTrader != null && steamID.Equals(currentTrader.getSteamId())) { if (currentTrader.incAttempts() < 3) { bot.SteamTrade.Trade(currentTrader.getSteamId()); } else { tradeEnded(); } } }