summaryrefslogtreecommitdiff
path: root/Hsbot/IRC.hs
diff options
context:
space:
mode:
authorJulien Dessaux2010-02-04 20:38:06 +0100
committerJulien Dessaux2010-02-04 20:38:06 +0100
commitd2f40f64819ec0b19911c684ea919beebf16af6d (patch)
tree18c7393fcd62d894741bdaede8f13e2bb708a437 /Hsbot/IRC.hs
parentReorganized code and types, changed slightly the architecture. (diff)
downloadhsbot-d2f40f64819ec0b19911c684ea919beebf16af6d.tar.gz
hsbot-d2f40f64819ec0b19911c684ea919beebf16af6d.tar.bz2
hsbot-d2f40f64819ec0b19911c684ea919beebf16af6d.zip
Finished changing plugin data structure to Maps.
Diffstat (limited to 'Hsbot/IRC.hs')
-rw-r--r--Hsbot/IRC.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Hsbot/IRC.hs b/Hsbot/IRC.hs
index 3fe2181..a8f3fcb 100644
--- a/Hsbot/IRC.hs
+++ b/Hsbot/IRC.hs
@@ -5,6 +5,7 @@ module Hsbot.IRC
import Control.Concurrent.Chan
import Control.Monad.State
+import qualified Data.Map as M
import Hsbot.IRCParser
import Hsbot.Plugin
@@ -30,7 +31,7 @@ runServer = do
msg <- liftIO input
case msg of
InputMsg inputMsg ->
- mapM_ (sendToPlugin $ InputMsg inputMsg) plugins
+ mapM_ (sendToPlugin (InputMsg inputMsg) . snd) (M.toList plugins)
OutputMsg outputMsg ->
sendstr (serializeIrcMsg outputMsg)
InternalCmd internalCmd ->