Archived
1
0
Fork 0

Added IRC connection and initialisation stuff.

This commit is contained in:
Julien Dessaux 2009-08-06 00:11:14 +02:00
parent 45ebb68aa0
commit b9c8e4d404
4 changed files with 34 additions and 5 deletions

View file

@ -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