ircbot-0.2.3: A library for writing irc bots

Network.IRC.Bot.Core

Synopsis

Documentation

simpleBotSource

Arguments

:: BotConf

Bot configuration

-> [BotPartT IO ()]

bot parts (must include pingPart, or equivalent)

-> IO [ThreadId]

ThreadId for all forked handler threads

simpleBot connects to the server and handles messages using the supplied BotPartTs

the 'Chan Message' for the optional logging function will include all received and sent messages. This means that the bots output will be included in the logs.

simpleBot'Source

Arguments

:: Maybe (Chan Message -> IO ())

optional logging function

-> Logger

application logging

-> HostName

irc server to connect

-> PortID

irc port to connect to (usually, 'PortNumber 6667')

-> String

irc nick

-> String

command prefix

-> User

irc user info

-> [BotPartT IO ()]

bot parts (must include pingPart, channelsPart, and nickUserPart)

-> IO [ThreadId]

ThreadId for all forked handler threads

simpleBot' connects to the server and handles messages using the supplied BotPartTs

the 'Chan Message' for the optional logging function will include all received and sent messages. This means that the bots output will be included in the logs.

data BotConf Source

Bot configuration

Constructors

BotConf 

Fields

channelLogger :: Maybe (Chan Message -> IO ())

optional channel logging function

logger :: Logger

app logging

host :: HostName

irc server to connect

port :: PortID

irc port to connect to (usually, 'PortNumber 6667')

nick :: String

irc nick

commandPrefix :: String

command prefix

user :: User

irc user info

channels :: Set String

channel to join

data User Source

Constructors

User 

Fields

username :: String

username on client system

hostname :: HostName

hostname of client system

servername :: HostName

irc server client is connected to

realname :: String

client's real name