summaryrefslogtreecommitdiff
path: root/Hsbot/Main.hs
diff options
context:
space:
mode:
authorJulien Dessaux2010-05-16 00:01:00 +0200
committerJulien Dessaux2010-05-16 00:01:00 +0200
commitc1662ba7b982a8502dc9f32031b7cb518df7f60e (patch)
treef00dbd9cb39bf0fbc20949105ea2b93d9e868070 /Hsbot/Main.hs
parentAdded the quote module. (diff)
downloadhsbot-c1662ba7b982a8502dc9f32031b7cb518df7f60e.tar.gz
hsbot-c1662ba7b982a8502dc9f32031b7cb518df7f60e.tar.bz2
hsbot-c1662ba7b982a8502dc9f32031b7cb518df7f60e.zip
Rewrote nearly everything!v0.2.0
* Rewrote the whole architecture to achieve extreme modularity * Added the ability to build a multiprotocol bot * Added cabal integration * Added configuration handling the XMonad style * Added configuration in ~/.hsbot * Refactored many many named and functions * Refactored data structures * Cleaned a big bunch of stuff
Diffstat (limited to '')
-rw-r--r--Hsbot/Main.hs36
1 files changed, 0 insertions, 36 deletions
diff --git a/Hsbot/Main.hs b/Hsbot/Main.hs
deleted file mode 100644
index 767722b..0000000
--- a/Hsbot/Main.hs
+++ /dev/null
@@ -1,36 +0,0 @@
-module Hsbot.Main
- ( imain
- ) where
-
-import Control.Exception
-import Control.Monad.State
-import Prelude hiding (catch)
-import System.IO()
-
-import Config
-import Hsbot.Core
-import Hsbot.IRC
-import Hsbot.Plugin
-import Hsbot.Types
-
-import Plugins.Core(mainCore)
-import Plugins.Ping(mainPing)
-import Plugins.Quote(mainQuote)
-
--- | Bot's main entry point
-imain :: IO ()
-imain = do
- bot <- connectServer $ ircServer config
- bot' <- (execStateT run bot) `catch` (\(_ :: IOException) -> return bot)
- evalStateT disconnectServer bot'
-
--- | The Bot monad main function
-run :: IrcBot ()
-run = do
- initServer
- liftIO $ putStrLn "Starting plugins..."
- loadPlugin "Ping" mainPing
- loadPlugin "Core" mainCore
- loadPlugin "Quote" mainQuote
- runServer
-