Archived
1
0
Fork 0

Finished changing plugin data structure to Maps.

This commit is contained in:
Julien Dessaux 2010-02-04 20:38:06 +01:00
parent 884c6c9f2e
commit d2f40f6481
3 changed files with 24 additions and 9 deletions

View file

@ -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 ->