diff options
Diffstat (limited to '')
-rw-r--r-- | Hsbot/IRC.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Hsbot/IRC.hs b/Hsbot/IRC.hs index a8f3fcb..c10467e 100644 --- a/Hsbot/IRC.hs +++ b/Hsbot/IRC.hs @@ -7,6 +7,7 @@ import Control.Concurrent.Chan import Control.Monad.State import qualified Data.Map as M +import Hsbot.Command import Hsbot.IRCParser import Hsbot.Plugin import Hsbot.Types @@ -30,12 +31,13 @@ runServer = do let input = readChan chan msg <- liftIO input case msg of - InputMsg inputMsg -> + InputMsg inputMsg -> do + dispatchCommand $ InputMsg inputMsg mapM_ (sendToPlugin (InputMsg inputMsg) . snd) (M.toList plugins) OutputMsg outputMsg -> sendstr (serializeIrcMsg outputMsg) - InternalCmd internalCmd -> - traceM "TODO" + InternalCmd _ -> + traceM "TODO internal command" runServer -- | Joins a chan |