diff options
author | joe <joe@jerkface.net> | 2013-06-20 18:50:18 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2013-06-20 18:50:18 -0400 |
commit | fa6a523704984bd98762a4e639b739e73320068f (patch) | |
tree | ca7d30d7b37e2c97368fa2ff14e2c5116b03c4ca /Presence/ConfigFiles.hs | |
parent | 2e72fc27f26fc75cd236701b220f4e2bfaf686c1 (diff) |
Work toward sending outgoing messages to remote peers
Diffstat (limited to 'Presence/ConfigFiles.hs')
-rw-r--r-- | Presence/ConfigFiles.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Presence/ConfigFiles.hs b/Presence/ConfigFiles.hs index ee0d5b85..f0e18f70 100644 --- a/Presence/ConfigFiles.hs +++ b/Presence/ConfigFiles.hs | |||
@@ -54,10 +54,12 @@ addSubscriber :: User -> ByteString -> IO () | |||
54 | addSubscriber user subscriber = | 54 | addSubscriber user subscriber = |
55 | subscriberPath user >>= addItem subscriber "<? subscribers ?>" | 55 | subscriberPath user >>= addItem subscriber "<? subscribers ?>" |
56 | 56 | ||
57 | getConfigList path = withFile path ReadMode $ | 57 | getConfigList path = |
58 | L.hGetContents | 58 | handle (\e -> if isDoesNotExistError e then (return []) else throw e) |
59 | >=> return . Prelude.tail . L.lines | 59 | $ withFile path ReadMode $ |
60 | >=> (\a -> seq (rnf a) (return a)) | 60 | L.hGetContents |
61 | >=> return . Prelude.tail . L.lines | ||
62 | >=> (\a -> seq (rnf a) (return a)) | ||
61 | 63 | ||
62 | getBuddies :: User -> IO [ByteString] | 64 | getBuddies :: User -> IO [ByteString] |
63 | getBuddies user = buddyPath user >>= getConfigList | 65 | getBuddies user = buddyPath user >>= getConfigList |