aboutsummaryrefslogtreecommitdiffstats
path: root/src/Reaktor/Plugins/System.hs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-27 03:23:17 +0100
committertv <tv@krebsco.de>2019-01-27 03:27:29 +0100
commite9ca12a945b1d1c068e9c31050e264cb20690db4 (patch)
tree6f12a1ede100424ebbd24f97f46bf9c31243d672 /src/Reaktor/Plugins/System.hs
parentaaddda85c74540d1dab452dcdddf425927983ea9 (diff)
Reaktor: add data Commandv0.2.0
Diffstat (limited to 'src/Reaktor/Plugins/System.hs')
-rw-r--r--src/Reaktor/Plugins/System.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Reaktor/Plugins/System.hs b/src/Reaktor/Plugins/System.hs
index a39bd23..864bbc3 100644
--- a/src/Reaktor/Plugins/System.hs
+++ b/src/Reaktor/Plugins/System.hs
@@ -36,12 +36,12 @@ import qualified Text.Regex.PCRE.Light as RE
new :: Config -> Actions -> IO (Message -> IO ())
new config@Config{..} actions@Actions{..} = do
pure $ \case
- Message (Just prefix) "PRIVMSG" (msgtarget:text:[]) -> do
- let hooks = maybe [] id (M.lookup "PRIVMSG" cHooks)
+ Message (Just prefix) PRIVMSG (msgtarget:text:[]) -> do
+ let hooks = maybe [] id (M.lookup PRIVMSG cHooks)
mapM_ (\h -> run1 config actions h prefix msgtarget text) hooks
- Message (Just prefix) "JOIN" (channel:[]) -> do
- let hooks = maybe [] id (M.lookup "JOIN" cHooks)
+ Message (Just prefix) JOIN (channel:[]) -> do
+ let hooks = maybe [] id (M.lookup JOIN cHooks)
mapM_ (\h -> run1 config actions h prefix channel "") hooks
_ -> pure ()