main :: IO ()
main = do
    (botnick:_) <- S.getArgs

    S.hSetBuffering S.stdout S.LineBuffering
    S.hSetBuffering S.stdin S.LineBuffering

    -- Load configuration.
    configName <- getDataFileName "data/dikunt.config"
    config <- Conf.load [ Conf.Required configName ]
    initialProb <- Conf.require config "asked-probability"

    let pipe = PT.stdinLn >-> P.map T.encodeUtf8 >-> parseRequest >->
            handleRequest >-> PT.stdoutLn
    runAsked botnick initialProb $ P.runEffect pipe
main :: IO ()
main = do
    (botnick:_) <- S.getArgs

    S.hSetBuffering S.stdout S.LineBuffering
    S.hSetBuffering S.stdin S.LineBuffering

    -- Load configuration.
    configName <- getDataFileName "data/dikunt.config"
    config <- Conf.load [ Conf.Required configName ]
    initialProb <- Conf.require config "asked-probability"

    let pipe = PT.stdinLn >-> P.map T.encodeUtf8 >-> parseRequest >->
            handleRequest >-> PT.stdoutLn
    runAsked botnick initialProb $ P.runEffect pipe
main = do
    (botnick:_) <- S.getArgs

    S.hSetBuffering S.stdout S.LineBuffering
    S.hSetBuffering S.stdin S.LineBuffering

    -- Load configuration.
    configName <- getDataFileName "data/dikunt.config"
    config <- Conf.load [ Conf.Required configName ]
    initialProb <- Conf.require config "asked-probability"

    let pipe = PT.stdinLn >-> P.map T.encodeUtf8 >-> parseRequest >->
            handleRequest >-> PT.stdoutLn
    runAsked botnick initialProb $ P.runEffect pipe