lambdabot-core-5.3.0.1: Lambdabot core functionality

Safe HaskellNone
LanguageHaskell98

Lambdabot.IRC

Description

The IRC module processes the IRC protocol and provides a nice API for sending and receiving IRC messages with an IRC server.

Synopsis

Documentation

data IrcMessage Source #

An IRC message is a server, a prefix, a command and a list of parameters.

Note that the strings here are treated as lists of bytes!

codepage :: String -> String -> IrcMessage Source #

codepage creates a server CODEPAGE message. The input string given is the codepage name for current session.

privmsg Source #

Arguments

:: Nick

Who should receive the message (nick)

-> String

What is the message?

-> IrcMessage

Constructed message

privmsg creates a private message to the person designated.

quit :: String -> String -> IrcMessage Source #

quit creates a server QUIT message. The input string given is the quit message, given to other parties when leaving the network.

timeReply :: IrcMessage -> IrcMessage Source #

Construct a privmsg from the CTCP TIME notice, to feed up to the @localtime-reply plugin, which then passes the output to the appropriate client.