Archived
1
0
Fork 0

Implemented update message handling in the bot's core.

This commit is contained in:
Julien Dessaux 2010-05-24 23:50:59 +02:00
parent a12e492772
commit 8b33600f38
9 changed files with 161 additions and 64 deletions

15
Hsbot/PluginUtils.hs Normal file
View file

@ -0,0 +1,15 @@
module Hsbot.PluginUtils
( sendToPlugin
) where
import Control.Concurrent
import Control.Concurrent.Chan ()
import Control.Monad.State
import Hsbot.Types
-- | Sends a msg to a plugin
sendToPlugin :: BotMsg -> PluginState -> Bot ()
sendToPlugin botMsg plugin = do
liftIO $ writeChan (pluginChan plugin) botMsg