summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Presence/ConfigFiles.hs20
1 files changed, 13 insertions, 7 deletions
diff --git a/Presence/ConfigFiles.hs b/Presence/ConfigFiles.hs
index 46d5a01c..27a65bbf 100644
--- a/Presence/ConfigFiles.hs
+++ b/Presence/ConfigFiles.hs
@@ -25,12 +25,18 @@ configDir, buddyFile, subscriberFile,
25 otherFile, pendingFile, solicitedFile, 25 otherFile, pendingFile, solicitedFile,
26 secretsFile :: FilePath 26 secretsFile :: FilePath
27 27
28-- A "buddy" is somebody who approved our friend request and will keep
29-- us informed of their presence.
30--
31-- A "subscriber" is somebody who we approved and promised to keep informed
32-- of our own presence.
33
28configDir = ".presence" 34configDir = ".presence"
29buddyFile = "buddies" 35buddyFile = "buddies" -- subscription="to"
30subscriberFile = "subscribers" 36subscriberFile = "subscribers" -- subscription="from"
37pendingFile = "pending" -- pending subscriber (we've yet to approve)
38solicitedFile = "solicited" -- pending buddy (we sent a friend request)
31otherFile = "others" 39otherFile = "others"
32pendingFile = "pending"
33solicitedFile = "solicited"
34secretsFile = "secret" 40secretsFile = "secret"
35 41
36 42
@@ -86,9 +92,9 @@ modifyFile ::
86 (ByteString,FilePath) 92 (ByteString,FilePath)
87 -> User 93 -> User
88 -> Profile 94 -> Profile
89 -> (ByteString -> IO (Maybe ByteString)) -- Returns Just for each item you want to keep. 95 -> (ByteString -> IO (Maybe ByteString)) -- ^ Returns Just for each item you want to keep.
90 -> Maybe ByteString -- Optionally append this item. 96 -> Maybe ByteString -- ^ Optionally append this item.
91 -> IO Bool -- Returns True if test function ever returned Nothing 97 -> IO Bool -- Returns True if test function ever returned Nothing
92modifyFile (tag,file) user profile test appending = configPath user profile file >>= doit 98modifyFile (tag,file) user profile test appending = configPath user profile file >>= doit
93 where 99 where
94 doit path = do 100 doit path = do