private void AddRoom(Channel channel) { _rooms.Add(channel); Rooms.Add(channel.Name); if (_logRooms.Contains(channel.Name, StringComparer.InvariantCultureIgnoreCase)) { LogRooms.Add(channel.Name); } }
private void EnsureBotInRoom(Channel channel) { if (channel.IsMember) return; var response = _api.ChannelsJoin(channel.Name); if (!response.Ok) { Logger.ErrorFormat("Could not join channel {0} ({1})", channel.Name, response.Error); return; } channel.IsMember = true; }
private void RemoveRoom(Channel channel) { _rooms.Remove(channel); Rooms.Remove(channel.Name); LogRooms.Remove(channel.Name); }