Archived
1
0
Fork 0

Moved files around as a preliminary for architectural changes.

This commit is contained in:
Julien Dessaux 2010-07-03 21:26:00 +02:00
parent d97177ce3b
commit 11c2c16835
29 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,27 @@
module Hsbot.Irc.Plugin.Dummy
( ircBotPluginDummy
) where
import Control.Concurrent.Chan
import Control.Exception
import Control.Monad.State
import Prelude hiding (catch)
import Hsbot.Irc.Message
import Hsbot.Irc.Plugin.Utils
-- | The plugin's main entry point
ircBotPluginDummy :: Chan IrcBotMsg -> Chan IrcBotMsg -> IO ()
ircBotPluginDummy myChan masterChan = do
let plugin = IrcPluginState { ircPluginName = "Dummy"
, ircPluginChan = myChan
, ircPluginMasterChan = masterChan }
_ <- (execStateT run plugin) `catch` (\(_ :: AsyncException) -> return plugin)
return ()
-- | The IrcPlugin monad main function
run :: IrcPlugin ()
run = forever $ do
_ <- readMsg
return ()