aboutsummaryrefslogtreecommitdiffstats
path: root/src/IRC.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/IRC.hs')
-rw-r--r--src/IRC.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/IRC.hs b/src/IRC.hs
index c669f99..b941982 100644
--- a/src/IRC.hs
+++ b/src/IRC.hs
@@ -36,11 +36,10 @@ handlePrivmsg = IRC.EventHandler
, channel = T.unpack nick
, nick = T.unpack nick
}
- Just plugin = matchPlugin message
- response <- liftIO $ performPlugin plugin message
- IRC.send $ case response of
- Left err -> IRC.Privmsg nick (Right (T.pack err))
- Right r -> IRC.Privmsg nick (Right (T.pack r))
+ response <- liftIO $ privmsgFromPlugin message
+ case response of
+ Nothing -> return ()
+ Just r -> r
dispatchEvent (IRC.Event
_ (IRC.Channel chan nick) (IRC.Privmsg _ (Right msg))) = do
let message = Message