ircbot-0.1.5: 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

-> Maybe PortID

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

-> String

irc nick

-> User

irc user info

-> String

channel to join

-> [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.

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 :: Maybe PortID

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

nick :: String

irc nick

user :: User

irc user info

channel :: 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