Added IRC connection and initialisation stuff.
This commit is contained in:
parent
45ebb68aa0
commit
b9c8e4d404
4 changed files with 34 additions and 5 deletions
|
@ -3,10 +3,12 @@ module Hsbot.Core
|
|||
, Config(..)
|
||||
, IrcServer(..)
|
||||
, newbot
|
||||
, sendstr
|
||||
) where
|
||||
|
||||
import qualified Data.Map as M
|
||||
import System.IO (Handle)
|
||||
import Text.Printf (hPrintf)
|
||||
|
||||
-- | An IRC Bot server state (socket handles)
|
||||
data Bot = Bot
|
||||
|
@ -34,3 +36,6 @@ data IrcServer = IrcServer
|
|||
newbot :: Bot
|
||||
newbot = Bot (M.empty)
|
||||
|
||||
-- | Send a string over handle
|
||||
sendstr handle str = hPrintf handle "%s\r\n" str
|
||||
|
||||
|
|
Reference in a new issue