diff options
author | Julien Dessaux | 2011-04-24 23:08:06 +0200 |
---|---|---|
committer | Julien Dessaux | 2011-05-01 03:28:22 +0200 |
commit | 864a364da99a0ec05f08d7cfbad4abde416a0b06 (patch) | |
tree | 40e92cdd6913aaa0121584c3c3e7436cdf38d926 /Hsbot/Utils.hs | |
parent | Continue refactoring, worked on the core loop and the plugin infrastructure. (diff) | |
download | hsbot-864a364da99a0ec05f08d7cfbad4abde416a0b06.tar.gz hsbot-864a364da99a0ec05f08d7cfbad4abde416a0b06.tar.bz2 hsbot-864a364da99a0ec05f08d7cfbad4abde416a0b06.zip |
Some API refactoring.
I can't say how I hate the Types.hs thing in Haskell!
Diffstat (limited to 'Hsbot/Utils.hs')
-rw-r--r-- | Hsbot/Utils.hs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/Hsbot/Utils.hs b/Hsbot/Utils.hs index 6b7f85e..0b32fa6 100644 --- a/Hsbot/Utils.hs +++ b/Hsbot/Utils.hs @@ -4,16 +4,13 @@ module Hsbot.Utils , first , initTLSEnv , readCertificate - , readMsg , readPrivateKey , sendStr , setGlobalQuitMVar - , writeMsg ) where import Control.Concurrent import Control.Monad.Reader -import Control.Monad.State import qualified Crypto.Cipher.RSA as RSA import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as C @@ -25,8 +22,6 @@ import Data.List import Network.TLS import System.IO -import Hsbot.Config -import Hsbot.Message import Hsbot.Types -- utility functions @@ -53,17 +48,6 @@ sendStr :: Handle -> Maybe TLSCtx -> String -> IO () sendStr _ (Just ctx) msg = sendData ctx $ L.fromChunks [C.pack msg] sendStr handle Nothing msg = hPutStrLn handle msg --- Plugin Utils -readMsg :: Plugin IO (Message) -readMsg = do - chan <- gets pluginChan - liftIO $ readChan chan >>= return - -writeMsg :: Message -> Plugin IO () -writeMsg msg = do - chan <- gets pluginMaster - liftIO $ writeChan chan msg - -- TLS utils initTLSEnv :: TLSConfig -> IO (TLSParams) initTLSEnv ssl = do |