diff options
-rw-r--r-- | Presence/ConfigFiles.hs | 20 |
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 | |||
28 | configDir = ".presence" | 34 | configDir = ".presence" |
29 | buddyFile = "buddies" | 35 | buddyFile = "buddies" -- subscription="to" |
30 | subscriberFile = "subscribers" | 36 | subscriberFile = "subscribers" -- subscription="from" |
37 | pendingFile = "pending" -- pending subscriber (we've yet to approve) | ||
38 | solicitedFile = "solicited" -- pending buddy (we sent a friend request) | ||
31 | otherFile = "others" | 39 | otherFile = "others" |
32 | pendingFile = "pending" | ||
33 | solicitedFile = "solicited" | ||
34 | secretsFile = "secret" | 40 | secretsFile = "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 |
92 | modifyFile (tag,file) user profile test appending = configPath user profile file >>= doit | 98 | modifyFile (tag,file) user profile test appending = configPath user profile file >>= doit |
93 | where | 99 | where |
94 | doit path = do | 100 | doit path = do |