aboutsummaryrefslogtreecommitdiffstats
path: root/src/Plugin.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugin.hs')
-rw-r--r--src/Plugin.hs13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/Plugin.hs b/src/Plugin.hs
index 6522e0b..41b0296 100644
--- a/src/Plugin.hs
+++ b/src/Plugin.hs
@@ -1,21 +1,12 @@
module Plugin
- ( Plugin
- , matchPlugin
+ ( matchPlugin
, performPlugin
, plugins
) where
import Text.Regex.TDFA
-type PluginAction = String -> String
-
-data Plugin = Plugin
- { matchRegex :: String
- , perform :: PluginAction
- }
-
-instance Show Plugin where
- show (Plugin r p) = "matchRegex = " ++ r
+import Plugin.Base
matchPlugin :: String -> Maybe Plugin
matchPlugin message = firstPlugin $ matchPlugins message plugins