bgneal@656: """Abstracts the list of users in the IRC channel.""" bgneal@656: bgneal@656: from redis import RedisError bgneal@656: bgneal@656: from core.services import get_redis_connection bgneal@656: bgneal@656: def get_users(): bgneal@656: """Return a list of users in the IRC channel.""" bgneal@656: conn = get_redis_connection() bgneal@656: try: bgneal@656: nicks = conn.get('irc:channel_members') bgneal@656: except RedisError: bgneal@656: nicks = None bgneal@656: bgneal@656: return nicks.split() if nicks else []