-- | Predicate for identifiers to identify which represent channel names.
-- Channel prefixes are configurable, but the most common is @#@
isChannelName :: Identifier -> IrcConnection -> Bool
isChannelName c conn =
  case B8.uncons (idBytes c) of
    Just (x,xs) -> not (B.null xs)
                && x `elem` view connChanTypes conn
    _ -> False -- probably shouldn't happen

-- | Predicate for identifiers to identify which represent nicknames
isChannelName :: Identifier -> IrcConnection -> Bool
isChannelName c conn =
  case B8.uncons (idBytes c) of
    Just (x,xs) -> not (B.null xs)
                && x `elem` view connChanTypes conn
    _ -> False -- probably shouldn't happen

-- | Predicate for identifiers to identify which represent nicknames
isChannelName c conn =
  case B8.uncons (idBytes c) of
    Just (x,xs) -> not (B.null xs)
                && x `elem` view connChanTypes conn
    _ -> False -- probably shouldn't happen

-- | Predicate for identifiers to identify which represent nicknames