title: 'No Ident response" and "Notice -- You need to identify via SASL to use this server" when attempting to connect to IRC with Roll Your Own Haskell Bot
body: <p>I am using <a href="https://wiki.haskell.org/Roll_your_own_IRC_bot" rel="nofollow noreferrer">Roll Your Own IRC Bot</a> on the Haskell wiki and I receive those two errors when running the code provided by the guide.</p>
  
  <p>What is wrong? Why can't I connect?</p>
  
  <p>I am using Ubuntu and I've tried compiling it with ghc and running it with ghci.</p>
  
  <pre><code>import Network
  import System.IO
  import Text.Printf
  
  server = "irc.freenode.org"
  port   = 6667
  chan   = "#tutbot-testing"
  nick   = "tutbot"
  
  main = do
      h &lt;- connectTo server (PortNumber (fromIntegral port))
      hSetBuffering h NoBuffering
      write h "NICK" nick
      write h "USER" (nick++" 0 * :tutorial bot")
      write h "JOIN" chan
      listen h
  
  write :: Handle -&gt; String -&gt; String -&gt; IO ()
  write h s t = do
      hPrintf h "%s %s\r\n" s t
      printf    "&gt; %s %s\n" s t
  
  listen :: Handle -&gt; IO ()
  listen h = forever $ do
      s &lt;- hGetLine h
      putStrLn s
    where
      forever a = do a; forever a
  </code></pre>