import Twitter.Http
import Twitter.Status
import Twitter.User
-
+import Usernames (Usernames(..))
-- | A wrapper around threadDelay which takes seconds instead of
-- microseconds as its argument.
-- set in either the config file or on the command-line.
let cfg = merge_optional default_config opt_config
- when (null $ usernames cfg) $ do
+ when (null $ get_usernames (usernames cfg)) $ do
hPutStrLn stderr "ERROR: no usernames supplied."
_ <- show_help
exitWith (ExitFailure exit_no_usernames)
-- Execute run_twat on each username in a new thread.
let run_twat_curried = run_twat cfg message
- _ <- mapM (forkIO . run_twat_curried) (usernames cfg)
+ _ <- mapM (forkIO . run_twat_curried) (get_usernames (usernames cfg))
_ <- forever $
-- This thread (the one executing main) doesn't do anything,