diff options
| author | pb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157> | 2010-03-14 14:12:17 +0000 |
|---|---|---|
| committer | pb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157> | 2010-03-14 14:12:17 +0000 |
| commit | a7865fd10582a9b710e96d2052a9ce90ced8020c (patch) | |
| tree | 00f7ce23717a4aca2352adb6346f5daa18411ec8 /Conf.hs | |
| parent | 3b090644f148acf856e925be59e6915ea524a3f8 (diff) | |
added environment
git-svn-id: https://ssl.buetow.org/repos/hsbot/trunk@26 9f8f72e9-4bf4-416e-b76e-7d4203597157
Diffstat (limited to 'Conf.hs')
| -rw-r--r-- | Conf.hs | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -7,7 +7,7 @@ type Conf = M.Map String String makeConf = M.fromList [ ("name", "HsBot") , ("version", "v0.0") - , ("database", "hsbot.db") + , ("databaseFile", "hsbot.db") , ("maxMessageSize", "400") , ("admin", "rantanplan") , ("ircServer", "irc.german-elite.net") @@ -19,3 +19,10 @@ makeConf = M.fromList get :: (Monad m) => String -> Conf -> m String get = M.lookup + +getUnwrappedInt :: String -> Conf -> Int +getUnwrappedInt key conf = read (getUnwrapped key conf) :: Int + +getUnwrapped :: String -> Conf -> String +getUnwrapped key conf = do { val <- get key conf; val } + |
