Пример #1
0
 private void AddRoom(Channel channel)
 {
     _rooms.Add(channel);
     Rooms.Add(channel.Name);
     if (_logRooms.Contains(channel.Name, StringComparer.InvariantCultureIgnoreCase))
     {
         LogRooms.Add(channel.Name);
     }
 }
Пример #2
0
        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;
        }
Пример #3
0
 private void RemoveRoom(Channel channel)
 {
     _rooms.Remove(channel);
     Rooms.Remove(channel.Name);
     LogRooms.Remove(channel.Name);
 }