Archived
1
0
Fork 0

Made the Plugin monad a Reader instead of a State since it can't change.

This commit is contained in:
Julien Dessaux 2011-05-06 19:15:40 +02:00
parent 4ec66d2ad7
commit a8c0c85787
7 changed files with 15 additions and 22 deletions

View file

@ -1,7 +1,6 @@
module Hsbot.Utils
( addThreadIdToQuitMVar
, delThreadIdFromQuitMVar
, first
, initTLSEnv
, readCertificate
, readPrivateKey
@ -41,9 +40,6 @@ setGlobalQuitMVar status = do
quitMv <- asks envQuitMv
liftIO $ putMVar quitMv status
first :: (a, b, c) -> a
first (a, _, _) = a
-- Helpers
sendStr :: Handle -> Maybe TLSCtx -> String -> IO ()
sendStr _ (Just ctx) msg = sendData ctx $ L.fromChunks [C.pack msg]