ircbot-0.6.4: A library for writing irc bots

Safe HaskellNone
LanguageHaskell98

Network.IRC.Bot.Core

Synopsis

Documentation

simpleBot Source

Arguments

:: BotConf

Bot configuration

-> [BotPartT IO ()]

bot parts (must include pingPart, or equivalent)

-> IO ([ThreadId], IO ())

ThreadId for all forked handler threads and a function that forces a reconnect

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

-> Maybe (Int, Int)

rate limiter settings (burst length, delay in microseconds)

-> HostName

irc server to connect

-> PortID

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

-> ByteString

irc nick

-> String

command prefix

-> User

irc user info

-> [BotPartT IO ()]

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

-> IO ([ThreadId], IO ())

ThreadId for all forked handler threads and an IO action that forces a reconnect

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

irc nick

commandPrefix :: String

command prefix

user :: User

irc user info

channels :: Set ByteString

channel to join

limits :: Maybe (Int, Int)

(burst length, delay in microseconds)

data User Source

Constructors

User 

Fields

username :: ByteString

username on client system

hostname :: HostName

hostname of client system

servername :: HostName

irc server client is connected to

realname :: ByteString

client's real name