irc-fun-client-0.1.0.0: Another library for writing IRC clients.

Safe HaskellNone
LanguageHaskell2010

Network.IRC.Fun.Client.Commands

Description

This module provides convenient functions for performing common IRC client actions. Some of them simply send a single IRC message, while othere send a sequence of several messages.

Synopsis

Documentation

ircLogin Source

Arguments

:: Handle

Handle to the open socket, returned from ircConnect

-> Connection

Connection configuration

-> Bool

Whether you want to be invisible (mode +i)

-> Bool

Whether you want to see wallops (mode +w)

-> IO () 

Log in as an IRC user with nickname and optional password, using the given connection parameters.

ircPong Source

Arguments

:: Handle

Handle to the open socket

-> String

Server name

-> Maybe String

Optional server to forward to

-> IO () 

IRC servers send PING messages at regular intervals to test the presence of an active client, at least if no other activity is detected on the connection. The server closes the connection automatically if a PONG response isn't sent from the client within a certain amount of time.

Therefore, an IRC client usually listens to these PINGs and sends back PONG messages. This function sends a PONG. The parameters should simply be the ones received in the PING message.

ircJoin Source

Arguments

:: Handle

Handle to the open socket

-> String

Channel name

-> Maybe String

Optional channel key (password)

-> IO () 

Join an IRC channel.

ircJoinMulti Source

Arguments

:: Handle

Handle to the open socket

-> [(String, Maybe String)]

List of channels and optional keys

-> IO () 

Join one or more IRC channels.

ircPart :: Handle -> String -> Maybe String -> IO () Source

Leave an IRC channel.

ircPartMulti :: Handle -> [String] -> Maybe String -> IO () Source

Leave one or more IRC channels.

ircPartAll :: Handle -> IO () Source

Leave all IRC channels you joined.

ircSendToUser Source

Arguments

:: Handle

Handle to the open socket

-> String

The user's nickname

-> String

The message to send

-> IO () 

Send a private message to an IRC user.

ircSendToChannel Source

Arguments

:: Handle

Handle to the open socket

-> String

The channel name

-> String

The message to send

-> IO () 

Send a message to an IRC channel.

ircQuit Source

Arguments

:: Handle

Handle to the open socket

-> Maybe String

Optional message, e.g. the reason you quit

-> IO () 

Finish the IRC session, asking the server to close the connection.