From e9ca12a945b1d1c068e9c31050e264cb20690db4 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 03:23:17 +0100 Subject: Reaktor: add data Command --- src/Reaktor/Plugins/System.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Reaktor/Plugins/System.hs') 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 () -- cgit v1.2.3