aboutsummaryrefslogtreecommitdiffstats
path: root/src/IRC.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/IRC.hs')
-rw-r--r--src/IRC.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/IRC.hs b/src/IRC.hs
index 2127aa7..18508b2 100644
--- a/src/IRC.hs
+++ b/src/IRC.hs
@@ -13,6 +13,7 @@ import qualified Data.Text as T
import qualified Network.IRC.Client as IRC
+import Bot (Bot)
import Message
import Plugin (matchPlugin, performPlugin)
import Plugin.Base (queryOnly)
@@ -61,10 +62,11 @@ handlePrivmsg = IRC.EventHandler
Nothing -> return ()
Just r -> sequence_ r
-privmsgFromPlugin :: Message -> MaybeT IO [IRC.StatefulIRC s ()]
+privmsgFromPlugin :: Message -> MaybeT Bot [IRC.StatefulIRC s ()]
privmsgFromPlugin message = do
plugin <- liftMaybe $ matchPlugin message
- response <- liftIO $ performPlugin plugin message
+ response <- lift $ performPlugin plugin message
+ -- plugin' <- liftMaybe plugin
return $ case response of
Left err -> [IRC.send $ IRC.Privmsg
(toChannel plugin message)