yak-0.2.0.0: A strongly typed IRC library

Safe HaskellNone
LanguageHaskell2010

Network.Yak.Client

Contents

Description

Messages for IRC Clients, implementing the current "living standard", to be found at https://modern.ircdocs.horse/. This module does not include the responses. See Network.Yak.Response for standard-compliant responses.

Synopsis

Connection Messages

type Authenticate = Msg "AUTHENTICATE" '[Text] Source #

AUTHENTICATE

type Pass = Msg "PASS" '[Text] Source #

PASS <password>

type Nick = Msg "NICK" '[Nickname] Source #

NICK <nickname>

type User = Msg "USER" '[Username, Word, Unused "*", Message] Source #

USER <username> 0 * <realname>

type Oper = Msg "OPER" '[Nickname, Text] Source #

OPER <name> <password>

type Quit = Msg "QUIT" '[Message] Source #

QUIT [<reason>]

Channel Operations

type Join = Msg "JOIN" '[NonEmpty Channel, [Text]] Source #

JOIN <channel>{,<channel>} [<key>{,<key>}]

type Join0 = Msg "JOIN" '[Unused "0"] Source #

type Part = Msg "PART" '[NonEmpty Channel, Maybe Message] Source #

PART <channel>{,<channel>} [<reason>]

type Topic = Msg "TOPIC" '[Channel, Maybe Message] Source #

TOPIC <channel> [<topic>]

type Names = Msg "NAMES" '[[Channel]] Source #

NAMES [<channel>{,<channel>}]

type List = Msg "LIST" '[[Channel], Maybe Text] Source #

LIST [<channel>{,<channel>}] [<elistcond>{,<elistcond>}]

Server Queries and Commands

type Motd = Msg "MOTD" '[Hostname] Source #

MOTD [<target>]

type Lusers = Msg "LUSERS" '[Maybe (Mask, Maybe Hostname)] Source #

LUSERS [<mask> [<target>]]

type Version = Msg "VERSION" '[Maybe Hostname] Source #

VERSION [<target>]

type Admin = Msg "ADMIN" '[Maybe Hostname] Source #

ADMIN [<target>]

type Connect = Msg "CONNECT" '[Hostname, Maybe (Int, Maybe Hostname)] Source #

CONNECT <target server> [<port> [<remote server>]]

type Time = Msg "TIME" '[Maybe Hostname] Source #

TIME [<server>]

type Stats = Msg "STATS" '[Char, Maybe Hostname] Source #

STATS <query> [<server>]

type Info = Msg "INFO" '[Maybe Hostname] Source #

INFO [<target>]

type Mode = Msg "MODE" '[Either Channel Nickname, Maybe ByteString] Source #

MODE <target> [<modestring> [<mode arguments>...]]

Sending Messages

type Privmsg = Msg "PRIVMSG" '[NonEmpty (Either Channel Nickname), Message] Source #

PRIVMSG <target>{,<target>} <text to be sent>

type Notice = Msg "NOTICE" '[NonEmpty (Either Channel Nickname), Message] Source #

NOTICE <target>{,<target>} <text to be sent>

User-based queries

type Who = Msg "WHO" '[Maybe Mask, Flag "o"] Source #

WHO [<mask>] [o]

type WhoIs = Msg "WHOIS" '[Maybe Hostname, NonEmpty Mask] Source #

WHOIS [<target>] <mask>{,<mask>}

type WhoWas = Msg "WHOWAS" '[NonEmpty Nickname, Maybe (Int, Maybe Hostname)] Source #

WHOWAS <nickname>{,<nickname} [<count>, [<target>]]

Optional Messages

type Userhost = Msg "USERHOST" '[Nickname, Maybe Nickname, Maybe Nickname, Maybe Nickname, Maybe Nickname] Source #

USERHOST <nickname>{ <nickname>}

Miscellaneous Messages

type Ping = Msg "PING" '[Hostname, Maybe Hostname] Source #

PING <server1> [<server2>]

type Pong = Msg "PONG" '[Hostname, Maybe Hostname] Source #

PONG <server1> [<server2>]

type Kill = Msg "KILL" '[Nickname, Message] Source #

KILL <nickname> <comment>

Extras

Common messages that are not specified out in the document above.

type Kick = Msg "KICK" '[NonEmpty Channel, NonEmpty Nickname, Maybe Message] Source #

KICK <channel>(,<channel>)* <nickname>(,<nickname>)* [message]

As defined in RFC 2812

type Invite = Msg "INVITE" '[Nickname, Channel] Source #

INVITE <nickname> <channel>

As defined in RFC 2812

Common Accessors

class HasChannel a where Source #

Class for extracting the channel out of messages that may contain channels

class HasNick a where Source #

Messages containing a nickname in one (unambigious) position.

Instances
HasNick Nick Source # 
Instance details

Defined in Network.Yak.Client

HasNick Oper Source # 
Instance details

Defined in Network.Yak.Client

HasNick Mode Source # 
Instance details

Defined in Network.Yak.Client

HasNick Privmsg Source # 
Instance details

Defined in Network.Yak.Client

HasNick Notice Source # 
Instance details

Defined in Network.Yak.Client

HasNick WhoWas Source # 
Instance details

Defined in Network.Yak.Client

HasNick Kill Source # 
Instance details

Defined in Network.Yak.Client

HasNick Kick Source # 
Instance details

Defined in Network.Yak.Client

HasNick Invite Source # 
Instance details

Defined in Network.Yak.Client

class HasHostname a where Source #

Messages containing a hostname in one (unambigious) position