diff options
author | lassulus <lassulus@lassul.us> | 2021-05-25 20:38:53 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-05-25 20:38:53 +0200 |
commit | e4850b9085121cd983f8f47e183dfda38d255562 (patch) | |
tree | 75d4bd7b2eae76f2c710134737b2ef187534a483 | |
parent | 734863be5c2cd7f7bdf5e60d957fb104c525abe6 (diff) |
Reaktor.API: allow TOPIC messages
-rw-r--r-- | src/Reaktor/API.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Reaktor/API.hs b/src/Reaktor/API.hs index 83fe27a..30b4dc6 100644 --- a/src/Reaktor/API.hs +++ b/src/Reaktor/API.hs @@ -79,12 +79,16 @@ main Actions{..} = \case serveTest :: Message -> Handler NoContent serveTest = \case + -- Allowing notice messages to (registered) channels. + msg@(Message Nothing NOTICE [msgtarget,_]) | isChannelName msgtarget -> do + liftIO $ aSend msg + return NoContent -- Allowing private messages to (registered) channels. msg@(Message Nothing PRIVMSG [msgtarget,_]) | isChannelName msgtarget -> do liftIO $ aSend msg return NoContent - -- Allowing notice messages to (registered) channels. - msg@(Message Nothing NOTICE [msgtarget,_]) | isChannelName msgtarget -> do + -- Allowing topic setting on (registered) channels. + msg@(Message Nothing TOPIC [msgtarget,_]) | isChannelName msgtarget -> do liftIO $ aSend msg return NoContent _ -> |