aboutsummaryrefslogtreecommitdiffstats
path: root/src/Reaktor/Plugins.hs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-23 00:02:42 +0100
committertv <tv@krebsco.de>2019-01-23 00:57:36 +0100
commitd40815fd56bf1895af89b72b1171675a2e0ae5f7 (patch)
tree83b96a701f16b13915836c3a6c94463732a9f6d8 /src/Reaktor/Plugins.hs
parenta00da57346c195b1b15d1c6aca2891483901aae6 (diff)
src: use more simple functionsv0.1.0
Diffstat (limited to 'src/Reaktor/Plugins.hs')
-rw-r--r--src/Reaktor/Plugins.hs28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/Reaktor/Plugins.hs b/src/Reaktor/Plugins.hs
deleted file mode 100644
index 86e1f2a..0000000
--- a/src/Reaktor/Plugins.hs
+++ /dev/null
@@ -1,28 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-module Reaktor.Plugins (get,registry) where
-
-import Data.Aeson (Value)
-import qualified Data.Map as M
-import qualified Data.Text as T
-import qualified Reaktor.Plugins.Mention
-import qualified Reaktor.Plugins.NickServ
-import qualified Reaktor.Plugins.Ping
-import qualified Reaktor.Plugins.Register
-import qualified Reaktor.Plugins.System
-import Reaktor.Internal (Plugin)
-
-
-get :: T.Text -> Value -> IO Plugin
-get name =
- case M.lookup name registry of
- Just p -> p
- Nothing -> error ("unknown plugin: " <> T.unpack name)
-
-registry :: M.Map T.Text (Value -> IO Plugin)
-registry = M.fromList [
- ("mention", Reaktor.Plugins.Mention.plugin),
- ("NickServ", Reaktor.Plugins.NickServ.plugin),
- ("ping", Reaktor.Plugins.Ping.plugin),
- ("register", Reaktor.Plugins.Register.plugin),
- ("system", Reaktor.Plugins.System.plugin)
- ]