--waitForNoIdent :: Handle -> IO ()
--waitForNoIdent sock = do
--  line <- BS.hGetLine sock
--  BS.putStrLn line
--  if "No Ident response" `BS.isInfixOf` line
--    then return ()
--    else waitForNoIdent sock  

-- |Waits for 001 numeric before performing the given action
waitFor001 :: Bot s () -> Bot s ()
waitFor001 action = do
  msg <- recvMsg
  case msg of
    IRCMsg {msgCmd = "001"} -> action
    _ -> waitFor001 action

-- |Indefinitely read input from the given 'Handle', parse each line as an IRC message, and send the IRC message to the bot input queue
waitFor001 :: Bot s () -> Bot s ()
waitFor001 action = do
  msg <- recvMsg
  case msg of
    IRCMsg {msgCmd = "001"} -> action
    _ -> waitFor001 action

-- |Indefinitely read input from the given 'Handle', parse each line as an IRC message, and send the IRC message to the bot input queue
waitFor001 action = do
  msg <- recvMsg
  case msg of
    IRCMsg {msgCmd = "001"} -> action
    _ -> waitFor001 action

-- |Indefinitely read input from the given 'Handle', parse each line as an IRC message, and send the IRC message to the bot input queue