hGetMessage :: Handle -> IO Message
hGetMessage h = do
  line <- hGetIRCLine h
  if B.null line
    then hGetMessage h
    else
      case readMessage line of
        Just msg -> return msg
        Nothing  -> hGetMessage h


-- | Write an IRC command with no origin.
hGetMessage :: Handle -> IO Message
hGetMessage h = do
  line <- hGetIRCLine h
  if B.null line
    then hGetMessage h
    else
      case readMessage line of
        Just msg -> return msg
        Nothing  -> hGetMessage h


-- | Write an IRC command with no origin.
hGetMessage h = do
  line <- hGetIRCLine h
  if B.null line
    then hGetMessage h
    else
      case readMessage line of
        Just msg -> return msg
        Nothing  -> hGetMessage h


-- | Write an IRC command with no origin.