Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
- ircLogin :: Handle -> Connection -> Bool -> Bool -> IO ()
- ircPong :: Handle -> String -> Maybe String -> IO ()
- ircJoin :: Handle -> String -> Maybe String -> IO ()
- ircJoinMulti :: Handle -> [(String, Maybe String)] -> IO ()
- ircPart :: Handle -> String -> Maybe String -> IO ()
- ircPartMulti :: Handle -> [String] -> Maybe String -> IO ()
- ircPartAll :: Handle -> IO ()
- ircSendToUser :: Handle -> String -> String -> IO ()
- ircSendToChannel :: Handle -> String -> String -> IO ()
- ircQuit :: Handle -> Maybe String -> IO ()
Documentation
Arguments
:: Handle | Handle to the open socket, returned from
|
-> Connection | Connection configuration |
-> Bool | Whether you want to be invisible (mode |
-> Bool | Whether you want to see wallops (mode |
-> IO () |
Log in as an IRC user with nickname and optional password, using the given connection parameters.
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.
Arguments
:: Handle | Handle to the open socket |
-> String | Channel name |
-> Maybe String | Optional channel key (password) |
-> IO () |
Join an IRC channel.
Arguments
:: Handle | Handle to the open socket |
-> [(String, Maybe String)] | List of channels and optional keys |
-> IO () |
Join one or more IRC channels.
ircPartAll :: Handle -> IO () Source
Leave all IRC channels you joined.
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.