module Main where import Control.Concurrent.Async import Control.Monad (forever) import System.IO (Handle) import Kirk.Config import Kirk.Simple main :: IO () main = do c <- parseConfigFromArgs r <- run c $ \h -> handshake c h >> race (ircAgent c h) (stdinForwarder c h) print r stdinForwarder :: Config -> Handle -> IO () stdinForwarder c h = forever (getLine >>= privmsg c h)