-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | An IRC client library and text client
--   
--   This package provides an IRC connection library as well as a
--   console-based IRC client that uses the library.
--   
--   <i>Library module breakdown</i>
--   
--   <ul>
--   <li><a>Irc.Cmd</a> - Functions for generating IRC protocol message for
--   client-to-server</li>
--   <li><a>Irc.Core</a> - Functions for parsing low-level IRC messages
--   into mid-level IRC messages</li>
--   <li><a>Irc.Core.Prisms</a> - Prisms for all of the mid-level IRC
--   message constructors</li>
--   <li><a>Irc.Format</a> - Functions for parsing and rendering low-level
--   IRC protocol messages</li>
--   <li><a>Irc.Message</a> - High-level IRC event messages for client
--   interpretation</li>
--   <li><a>Irc.Model</a> - Functions for interpreting mid-level IRC
--   messages to generate high-level event messages and to maintain a
--   consistent view of the connection</li>
--   <li><a>Irc.RateLimit</a> - Functions to assist with rate-limiting
--   outgoing client messages</li>
--   <li><a>Irc.Time</a> - Internal compatibility module for time-1.4 and
--   time-1.5 interop</li>
--   </ul>
--   
--   <i>Library module breakdown</i>
--   
--   <ul>
--   <li><a>Main</a> - Main client module</li>
--   <li><a>ClientState</a> - Types and operations representing the full
--   state of the client</li>
--   <li><a>CommandArgs</a> - Types and functions for interpreting the
--   initial client configuration</li>
--   <li><a>CommandParser</a> - Types and functions for parsing and pretty
--   printing IRC commands</li>
--   <li><a>Connection</a> - Types and functions for establishing a plain
--   and TLS connections</li>
--   <li><a>CtcpHandler</a> - Event handler for CTCP messages</li>
--   <li><a>EditBox</a> - Types and functions for managing the input box
--   along the bottom of the client</li>
--   <li><a>HaskelHighlighter</a> - Haskell syntax highlighting
--   support</li>
--   <li><a>ImageUtils</a> - Functions to support the various view
--   construction</li>
--   <li><a>Moderation</a> - Implementation of various IRC channel
--   moderation automation</li>
--   <li><a>ServerSettings</a> - Types for defining connection parameters
--   for an IRC server</li>
--   <li><a>Views.BanList</a> - Functions to generate the ban list
--   view</li>
--   <li><a>Views.Channel</a> - Functions to generate message list
--   views</li>
--   <li><a>Views.ChannelInfo</a> - Functions to generate metadata views
--   for channels</li>
--   </ul>
--   
--   See the associated README file for help using the client.
@package irc-core
@version 1.1.0.1


-- | This module implements a simple rate limiter based on the to be used
--   to keep an IRC client from getting kicked due to flooding. It allows
--   one event per duration with a given threshold.
module Irc.RateLimit

-- | The <a>RateLimit</a> keeps track of rate limit settings as well as the
--   current state of the limit.
data RateLimit

-- | Construct a new rate limit with the given penalty and threshold.
newRateLimit :: Int -> Int -> IO RateLimit

-- | Construct a new rate limit with the RFC 2813 specified 2 second
--   penalty and 10 second threshold
newRateLimitDefault :: IO RateLimit

-- | Account for an event in the context of a <a>RateLimit</a>. This
--   command will block and delay as required to satisfy the current rate.
--   Once it returns it is safe to proceed with the rate limited action.
tickRateLimit :: RateLimit -> IO ()


-- | This module provides a parser and printer for the low-level IRC
--   message format.
module Irc.Format

-- | <a>UserInfo</a> packages a nickname along with the username and
--   hsotname if they are known in the current context.
data UserInfo
UserInfo :: Identifier -> Maybe ByteString -> Maybe ByteString -> UserInfo
userNick :: UserInfo -> Identifier
userName :: UserInfo -> Maybe ByteString
userHost :: UserInfo -> Maybe ByteString

-- | <a>RawIrcMsg</a> breaks down the IRC protocol into its most basic
--   parts. The "trailing" parameter indicated in the IRC protocol with a
--   leading colon will appear as the last parameter in the parameter list.
--   
--   Note that RFC 2812 specifies a maximum of 15 parameters.
--   
--   <pre>
--   :prefix COMMAND param0 param1 param2 .. paramN
--   </pre>
data RawIrcMsg
RawIrcMsg :: Maybe UTCTime -> Maybe UserInfo -> ByteString -> [ByteString] -> RawIrcMsg
msgTime :: RawIrcMsg -> Maybe UTCTime
msgPrefix :: RawIrcMsg -> Maybe UserInfo
msgCommand :: RawIrcMsg -> ByteString
msgParams :: RawIrcMsg -> [ByteString]

-- | Attempt to split an IRC protocol message without its trailing newline
--   information into a structured message.
parseRawIrcMsg :: ByteString -> Maybe RawIrcMsg

-- | Serialize a structured IRC protocol message back into its wire format.
--   This command adds the required trailing newline.
renderRawIrcMsg :: RawIrcMsg -> ByteString

-- | Split up a hostmask into a nickname, username, and hostname. The
--   username and hostname might not be defined but are delimited by a
--   <tt>!</tt> and <tt>@</tt> respectively.
parseUserInfo :: ByteString -> UserInfo

-- | Take the bytes up to the next space delimiter. If the first character
--   of this token is a <tt>:</tt> then take the whole remaining bytestring
--   
--   Render <a>UserInfo</a> as <tt>nick!username@hostname</tt>
renderUserInfo :: UserInfo -> ByteString

-- | Case insensitive identifier representing channels and nicknames
data Identifier

-- | Construct an <a>Identifier</a> from a <a>ByteString</a>
mkId :: ByteString -> Identifier

-- | Returns the original <a>ByteString</a> of an <a>Identifier</a>
idBytes :: Identifier -> ByteString

-- | Returns the case-normalized <a>ByteString</a> of an <a>Identifier</a>
--   which is suitable for comparison.
idDenote :: Identifier -> ByteString
asUtf8 :: ByteString -> Text

-- | Capitalize a string according to RFC 2812 Latin letters are
--   capitalized and {|}~ are mapped to []^
ircFoldCase :: ByteString -> ByteString
instance Read Identifier
instance Show Identifier
instance Read UserInfo
instance Show UserInfo
instance Read RawIrcMsg
instance Show RawIrcMsg
instance IsString Identifier
instance Ord Identifier
instance Eq Identifier


-- | This module provides functions for constructing outgoing IRC messages
--   from the client to the server.
--   
--   Note: These functions add the required trailing newline characters.
module Irc.Cmd

-- | Construct a PASS command. This is used in the initial handshake to
--   specify a password for the connection.
--   
--   <pre>
--   PASS password
--   </pre>
passCmd :: ByteString -> ByteString

-- | Construct a NICK command. This is used to specify the initial nickname
--   as well as to change it.
--   
--   <pre>
--   NICK nickname
--   </pre>
nickCmd :: Identifier -> ByteString

-- | Construct a USER command. This is used in the initial handshake to
--   specify username and realname.
--   
--   <pre>
--   USER username 0 * realname
--   </pre>
userCmd :: ByteString -> ByteString -> ByteString

-- | Construct an OPER command.
--   
--   <pre>
--   OPER <a>name</a> <a>password</a>
--   </pre>
operCmd :: ByteString -> ByteString -> ByteString

-- | Construct a MODE command
--   
--   <pre>
--   MODE target *(mode) *(modeparams)
--   </pre>
modeCmd :: Identifier -> [ByteString] -> ByteString

-- | Construct a QUIT command.
--   
--   <pre>
--   QUIT quit_message
--   </pre>
quitCmd :: ByteString -> ByteString

-- | Construct a JOIN command. A join command can support multiple channels
--   separated by commas, and takes an optional channel key.
--   
--   <pre>
--   JOIN channel [key]
--   </pre>
joinCmd :: Identifier -> Maybe ByteString -> ByteString

-- | Construct a PART command.
--   
--   <pre>
--   PART channel message
--   </pre>
partCmd :: Identifier -> ByteString -> ByteString

-- | Construct a TOPIC command. This is used to lookup the current topic or
--   to change it.
--   
--   <pre>
--   TOPIC channel message
--   </pre>
topicCmd :: Identifier -> ByteString -> ByteString

-- | Construct a NAMES command.
--   
--   <pre>
--   NAMES [ <a>channel</a> *("," <a>channel</a>)
--   </pre>
namesCmd :: [Identifier] -> ByteString

-- | Construct a LIST command.
--   
--   <pre>
--   LIST <a>channel</a> *("," <a>channel</a>)
--   </pre>
listCmd :: [Identifier] -> ByteString

-- | Construct a INVITE command.
--   
--   <pre>
--   INVITE <a>nickanme</a> <a>channel</a>
--   </pre>
inviteCmd :: Identifier -> Identifier -> ByteString

-- | Construct a KICK command
--   
--   @KICK channel nick msg
kickCmd :: Identifier -> Identifier -> ByteString -> ByteString

-- | Construct a PRIVMSG command. This send normal chat messages to both
--   users as well as channels.
--   
--   <pre>
--   PRIVMSG target message
--   </pre>
privMsgCmd :: Identifier -> ByteString -> ByteString
ctcpRequestCmd :: Identifier -> ByteString -> ByteString -> ByteString
ctcpResponseCmd :: Identifier -> ByteString -> ByteString -> ByteString

-- | Construct a NOTICE command. This send notice chat messages to both
--   users as well as channels.
--   
--   <pre>
--   NOTICE target message
--   </pre>
noticeCmd :: Identifier -> ByteString -> ByteString

-- | Construct a WHOIS command.
--   
--   <pre>
--   WHOIS user
--   </pre>
whoisCmd :: Identifier -> ByteString

-- | Construct a WHOWAS command.
--   
--   <pre>
--   WHOWAS user
--   </pre>
whowasCmd :: Identifier -> ByteString

-- | Construct a WHO command.
--   
--   <pre>
--   WHO <a>mask</a>
--   </pre>
whoCmd :: ByteString -> ByteString

-- | Construct a PONG command. This is used to respond to the PING command
--   to keep a connection alive.
--   
--   <pre>
--   PONG token
--   </pre>
pongCmd :: ByteString -> ByteString

-- | Construct a PING command. This is used to respond to the PING command
--   to keep a connection alive.
--   
--   <pre>
--   PONG token
--   </pre>
pingCmd :: ByteString -> ByteString

-- | Construct a CAP LS command. This is used during the inital connection
--   to request a list of extensions that are supported by the server. It
--   should be followed by CAP REQ and eventually CAP END commands.
--   
--   <pre>
--   CAP LS
--   </pre>
capLsCmd :: ByteString

-- | Construct a CAP REQ command. This is used to request a subset of the
--   capabilities returned in response to a CAP LS command.
--   
--   <pre>
--   CAP REQ :cap0 cap1 .. capN
--   </pre>
capReqCmd :: [ByteString] -> ByteString

-- | Construct a CAP END command. This terminates the capability
--   negotiation portion of the initial connection.
--   
--   <pre>
--   CAP END
--   </pre>
capEndCmd :: ByteString

-- | Construct an AUTHENTICATE command.
--   
--   <pre>
--   AUTHENTICATE message
--   </pre>
authenticateCmd :: ByteString -> ByteString

-- | Construct an AWAY command.
--   
--   <pre>
--   AWAY away_message
--   </pre>
awayCmd :: ByteString -> ByteString

-- | Construct a HELP command.
--   
--   <pre>
--   HELP topic
--   </pre>
helpCmd :: ByteString -> ByteString

-- | Construct a REMOVE command
--   
--   @REMOVE channel nick msg
removeCmd :: Identifier -> Identifier -> ByteString -> ByteString

-- | Construct a KNOCK command.
--   
--   <pre>
--   KNOCK <a>channel</a>
--   </pre>
knockCmd :: Identifier -> ByteString

-- | Construct an ACCEPT command.
--   
--   <pre>
--   ACCEPT <a>nick</a>
--   </pre>
acceptCmd :: ByteString -> ByteString

-- | Construct an TIME command.
--   
--   <pre>
--   TIME [<a>server</a>]&gt;
--   </pre>
timeCmd :: Maybe ByteString -> ByteString

-- | Construct an ADMIN command.
--   
--   <pre>
--   ADMIN [<a>server</a>]&gt;
--   </pre>
adminCmd :: Maybe ByteString -> ByteString

-- | Construct a STATS command.
--   
--   <pre>
--   STATS <a>letter</a> [<a>server</a>]&gt;
--   </pre>
statsCmd :: Char -> Maybe ByteString -> ByteString


-- | This module provides a bridge between the low-level text protocol that
--   IRC uses and the high-level events in the <a>Irc.Model</a> module.
module Irc.Core

-- | <a>MsgFromServer</a> provides a typed view of the various IRC protocol
--   messages. There are more messages defined for IRC (and many of those
--   overlap) than are in common use. Please report a bug if a common
--   message is missing from this type.
data MsgFromServer

-- | 001 "Welcome to the Internet Relay Network
--   &lt;nick&gt;!&lt;user&gt;@&lt;host&gt;"
RplWelcome :: ByteString -> MsgFromServer

-- | 002 "Your host is &lt;servername&gt;, running version &lt;ver&gt;"
RplYourHost :: ByteString -> MsgFromServer

-- | 003 "This server was created &lt;date&gt;"
RplCreated :: ByteString -> MsgFromServer

-- | 004 servername version *(modes)
RplMyInfo :: ByteString -> ByteString -> [ByteString] -> MsgFromServer

-- | 005 *(KEY=VALUE)
RplISupport :: [(ByteString, ByteString)] -> MsgFromServer

-- | 008 snomask
RplSnoMask :: ByteString -> MsgFromServer

-- | 042 unique-id
RplYourId :: ByteString -> MsgFromServer

-- | 211 arguments
RplStatsLinkInfo :: [ByteString] -> MsgFromServer

-- | 212 arguments
RplStatsCommands :: [ByteString] -> MsgFromServer

-- | 213 arguments
RplStatsCLine :: [ByteString] -> MsgFromServer

-- | 214 arguments
RplStatsNLine :: [ByteString] -> MsgFromServer

-- | 215 arguments
RplStatsILine :: [ByteString] -> MsgFromServer

-- | 216 arguments
RplStatsKLine :: [ByteString] -> MsgFromServer

-- | 217 arguments
RplStatsQLine :: [ByteString] -> MsgFromServer

-- | 218 arguments
RplStatsYLine :: [ByteString] -> MsgFromServer

-- | 219 mode
RplEndOfStats :: Char -> MsgFromServer

-- | 220 arguments
RplStatsPLine :: [ByteString] -> MsgFromServer

-- | 221 modes *(params)
RplUmodeIs :: ByteString -> [ByteString] -> MsgFromServer

-- | 225
RplStatsDLine :: [ByteString] -> MsgFromServer

-- | 240
RplStatsVLine :: [ByteString] -> MsgFromServer

-- | 241
RplStatsLLine :: [ByteString] -> MsgFromServer

-- | 242
RplStatsUptime :: ByteString -> MsgFromServer

-- | 243
RplStatsOLine :: [ByteString] -> MsgFromServer

-- | 244
RplStatsHLine :: [ByteString] -> MsgFromServer

-- | 245
RplStatsSLine :: [ByteString] -> MsgFromServer

-- | 246
RplStatsPing :: [ByteString] -> MsgFromServer

-- | 247
RplStatsXLine :: [ByteString] -> MsgFromServer

-- | 248
RplStatsULine :: [ByteString] -> MsgFromServer

-- | 249
RplStatsDebug :: [ByteString] -> MsgFromServer

-- | 250 connection
RplStatsConn :: ByteString -> MsgFromServer

-- | 251 "There are &lt;integer&gt; users and &lt;integer&gt; services on
--   &lt;integer&gt; servers"
RplLuserClient :: ByteString -> MsgFromServer

-- | 252 number-of-ops
RplLuserOp :: ByteString -> MsgFromServer

-- | 253 number-of-unknown
RplLuserUnknown :: ByteString -> MsgFromServer

-- | 254 number-of-channels
RplLuserChannels :: ByteString -> MsgFromServer

-- | 255 "I have &lt;integer&gt; clients and &lt;integer&gt; servers"
RplLuserMe :: ByteString -> MsgFromServer

-- | 256 server
RplLuserAdminMe :: ByteString -> MsgFromServer

-- | 257 admin-info-1
RplLuserAdminLoc1 :: ByteString -> MsgFromServer

-- | 258 admin-info-2
RplLuserAdminLoc2 :: ByteString -> MsgFromServer

-- | 259 admin-email
RplLuserAdminEmail :: ByteString -> MsgFromServer

-- | 263 command
RplLoadTooHigh :: ByteString -> MsgFromServer

-- | 265 [local] [max] txt
RplLocalUsers :: [ByteString] -> MsgFromServer

-- | 266 [global] [max] txt
RplGlobalUsers :: [ByteString] -> MsgFromServer

-- | 270 privstring
RplPrivs :: ByteString -> MsgFromServer

-- | 276 nick txt
RplWhoisCertFp :: Identifier -> ByteString -> MsgFromServer

-- | 281
RplAcceptList :: Identifier -> MsgFromServer

-- | 282
RplEndOfAccept :: MsgFromServer

-- | 301 nick away_message
RplAway :: Identifier -> ByteString -> MsgFromServer

-- | 302 *(user hosts)
RplUserHost :: [ByteString] -> MsgFromServer

-- | 303 *(nick)
RplIsOn :: [Identifier] -> MsgFromServer

-- | (inspircd) 304 text
RplSyntax :: ByteString -> MsgFromServer

-- | 305
RplUnAway :: MsgFromServer

-- | 306
RplNowAway :: MsgFromServer

-- | 311 nick user host realname
RplWhoisUser :: Identifier -> ByteString -> ByteString -> ByteString -> MsgFromServer

-- | 312 nick server serverinfo
RplWhoisServer :: Identifier -> ByteString -> ByteString -> MsgFromServer

-- | 313 nick "is an IRC operator"
RplWhoisOperator :: Identifier -> ByteString -> MsgFromServer

-- | 314 nick user host realname
RplWhoWasUser :: Identifier -> ByteString -> ByteString -> ByteString -> MsgFromServer

-- | 315 channel
RplEndOfWho :: Identifier -> MsgFromServer

-- | 317 nick idle signon
RplWhoisIdle :: Identifier -> Integer -> (Maybe UTCTime) -> MsgFromServer

-- | 318 nick
RplEndOfWhois :: Identifier -> MsgFromServer

-- | 319 nick channels
RplWhoisChannels :: Identifier -> ByteString -> MsgFromServer

-- | 321
RplListStart :: MsgFromServer

-- | 322 channel usercount topic
RplList :: Identifier -> Integer -> ByteString -> MsgFromServer

-- | 323
RplListEnd :: MsgFromServer

-- | 324 channel modes *(params)
RplChannelModeIs :: Identifier -> ByteString -> [ByteString] -> MsgFromServer

-- | 331 channel
RplNoTopicSet :: Identifier -> MsgFromServer

-- | 332 channel topic
RplTopic :: Identifier -> ByteString -> MsgFromServer

-- | 328 channel url
RplChannelUrl :: Identifier -> ByteString -> MsgFromServer

-- | 329 channel timestamp
RplCreationTime :: Identifier -> UTCTime -> MsgFromServer

-- | 330 nick account
RplWhoisAccount :: Identifier -> ByteString -> MsgFromServer

-- | 333 channel nickname timestamp
RplTopicWhoTime :: Identifier -> ByteString -> UTCTime -> MsgFromServer

-- | 341 nick channel
RplInviting :: Identifier -> Identifier -> MsgFromServer

-- | 346 channel mask who timestamp
RplInviteList :: Identifier -> ByteString -> ByteString -> UTCTime -> MsgFromServer

-- | 347 channel
RplEndOfInviteList :: Identifier -> MsgFromServer

-- | 348 channel mask who timestamp
RplExceptionList :: Identifier -> ByteString -> ByteString -> UTCTime -> MsgFromServer

-- | 349 channel
RplEndOfExceptionList :: Identifier -> MsgFromServer

-- | 351 version server comments
RplVersion :: [ByteString] -> MsgFromServer

-- | 352 channel user host server nick flags txt
RplWhoReply :: Identifier -> ByteString -> ByteString -> ByteString -> Identifier -> ByteString -> ByteString -> MsgFromServer

-- | 353 channeltype channel names
RplNameReply :: ChannelType -> Identifier -> [ByteString] -> MsgFromServer

-- | 364 mask server info
RplLinks :: ByteString -> ByteString -> ByteString -> MsgFromServer

-- | 365 mask
RplEndOfLinks :: ByteString -> MsgFromServer

-- | 366 channel
RplEndOfNames :: Identifier -> MsgFromServer

-- | 367 channel banned banner timestamp
RplBanList :: Identifier -> ByteString -> ByteString -> UTCTime -> MsgFromServer

-- | 368 channel
RplEndOfBanList :: Identifier -> MsgFromServer

-- | 369 nick
RplEndOfWhoWas :: Identifier -> MsgFromServer

-- | 372 line-of-motd
RplMotd :: ByteString -> MsgFromServer

-- | 375
RplMotdStart :: MsgFromServer

-- | 376
RplEndOfMotd :: MsgFromServer

-- | 391 server "&lt;string showing server's local time&gt;"
RplTime :: ByteString -> ByteString -> MsgFromServer

-- | 371 info
RplInfo :: ByteString -> MsgFromServer

-- | 374
RplEndOfInfo :: MsgFromServer

-- | 378 nick host
RplWhoisHost :: Identifier -> ByteString -> MsgFromServer

-- | 379 nick modes *(args)
RplWhoisModes :: Identifier -> ByteString -> [ByteString] -> MsgFromServer

-- | 381 text
RplYoureOper :: ByteString -> MsgFromServer

-- | 396 hostname
RplHostHidden :: ByteString -> MsgFromServer
Err :: Identifier -> IrcError -> MsgFromServer

-- | 671 nick
RplWhoisSecure :: Identifier -> MsgFromServer

-- | 704 topic text
RplHelpStart :: ByteString -> ByteString -> MsgFromServer

-- | 705 topic text
RplHelp :: ByteString -> ByteString -> MsgFromServer

-- | 706 topic text
RplEndOfHelp :: ByteString -> MsgFromServer

-- | 710 channel
RplKnock :: Identifier -> UserInfo -> MsgFromServer

-- | 711 channel
RplKnockDelivered :: Identifier -> MsgFromServer

-- | 717 nick
RplTargNotify :: Identifier -> MsgFromServer

-- | 718 nick mask
RplUmodeGMsg :: Identifier -> ByteString -> MsgFromServer

-- | 728 channel mode mask who timestamp
RplQuietList :: Identifier -> Char -> ByteString -> ByteString -> UTCTime -> MsgFromServer

-- | 729 channel mode
RplEndOfQuietList :: Identifier -> Char -> MsgFromServer

-- | 900 account
RplLoggedIn :: ByteString -> MsgFromServer

-- | 901
RplLoggedOut :: MsgFromServer

-- | 902
RplNickLocked :: MsgFromServer

-- | 903
RplSaslSuccess :: MsgFromServer

-- | 904
RplSaslFail :: MsgFromServer

-- | 905
RplSaslTooLong :: MsgFromServer

-- | 906
RplSaslAborted :: MsgFromServer

-- | 907
RplSaslAlready :: MsgFromServer

-- | 908 comma-sep-mechs
RplSaslMechs :: ByteString -> MsgFromServer
Away :: UserInfo -> (Maybe ByteString) -> MsgFromServer
Ping :: ByteString -> MsgFromServer
Pong :: ByteString -> (Maybe ByteString) -> MsgFromServer
Notice :: UserInfo -> Identifier -> ByteString -> MsgFromServer
Topic :: UserInfo -> Identifier -> ByteString -> MsgFromServer
PrivMsg :: UserInfo -> Identifier -> ByteString -> MsgFromServer
ExtJoin :: UserInfo -> Identifier -> (Maybe ByteString) -> ByteString -> MsgFromServer
Join :: UserInfo -> Identifier -> MsgFromServer
Nick :: UserInfo -> Identifier -> MsgFromServer
Mode :: UserInfo -> Identifier -> [ByteString] -> MsgFromServer
Quit :: UserInfo -> ByteString -> MsgFromServer
Cap :: ByteString -> ByteString -> MsgFromServer
Kick :: UserInfo -> Identifier -> Identifier -> ByteString -> MsgFromServer
Part :: UserInfo -> Identifier -> ByteString -> MsgFromServer
Invite :: UserInfo -> Identifier -> MsgFromServer
Error :: ByteString -> MsgFromServer
Authenticate :: ByteString -> MsgFromServer
Account :: UserInfo -> (Maybe ByteString) -> MsgFromServer
data IrcError

-- | 401
ErrNoSuchNick :: IrcError

-- | 402 server
ErrNoSuchServer :: ByteString -> IrcError

-- | 403
ErrNoSuchChannel :: IrcError

-- | 404
ErrCannotSendToChan :: IrcError

-- | 405
ErrTooManyChannels :: IrcError

-- | 406
ErrWasNoSuchNick :: IrcError

-- | 407
ErrTooManyTargets :: IrcError

-- | 409
ErrNoOrigin :: IrcError

-- | 411
ErrNoRecipient :: IrcError

-- | 412
ErrNoTextToSend :: IrcError

-- | 421 command
ErrUnknownCommand :: ByteString -> IrcError

-- | 422
ErrNoMotd :: IrcError

-- | 423 server
ErrNoAdminInfo :: ByteString -> IrcError

-- | 431
ErrNoNicknameGiven :: IrcError

-- | 432 badnick
ErrErroneousNickname :: ByteString -> IrcError

-- | 433 nick
ErrNicknameInUse :: Identifier -> IrcError

-- | 435
ErrBanNickChange :: IrcError

-- | 437
ErrUnavailResource :: IrcError

-- | 438
ErrNickTooFast :: IrcError

-- | 440
ErrServicesDown :: IrcError

-- | 441 nick
ErrUserNotInChannel :: Identifier -> IrcError

-- | 442 channel
ErrNotOnChannel :: IrcError

-- | 443 nick
ErrUserOnChannel :: Identifier -> IrcError

-- | 451
ErrNotRegistered :: IrcError

-- | 456
ErrAcceptFull :: IrcError

-- | 457
ErrAcceptExist :: IrcError

-- | 458
ErrAcceptNot :: IrcError

-- | 461 command
ErrNeedMoreParams :: ByteString -> IrcError

-- | 462
ErrAlreadyRegistered :: IrcError

-- | 463
ErrNoPermForHost :: IrcError

-- | 464
ErrPasswordMismatch :: IrcError

-- | 465
ErrYoureBannedCreep :: IrcError

-- | 470 dstchannel
ErrLinkChannel :: Identifier -> IrcError

-- | 471 channel
ErrChannelFull :: IrcError

-- | 472 mode
ErrUnknownMode :: Char -> IrcError

-- | 473
ErrInviteOnlyChan :: IrcError

-- | 474
ErrBannedFromChan :: IrcError

-- | 475
ErrBadChannelKey :: IrcError

-- | 477
ErrNeedReggedNick :: IrcError

-- | 478 mode
ErrBanListFull :: Char -> IrcError

-- | 479 name
ErrBadChanName :: ByteString -> IrcError

-- | 480
ErrThrottle :: IrcError

-- | 481
ErrNoPrivileges :: IrcError

-- | 482
ErrChanOpPrivsNeeded :: IrcError

-- | 483
ErrCantKillServer :: IrcError

-- | 484 nick
ErrIsChanService :: Identifier -> IrcError

-- | 486
ErrNoNonReg :: IrcError

-- | 489
ErrVoiceNeeded :: IrcError

-- | 491
ErrNoOperHost :: IrcError

-- | 494
ErrOwnMode :: IrcError

-- | 501 mode
ErrUnknownUmodeFlag :: Char -> IrcError

-- | 502
ErrUsersDontMatch :: IrcError

-- | 524 topic
ErrHelpNotFound :: ByteString -> IrcError

-- | 713
ErrTooManyKnocks :: IrcError

-- | 713
ErrChanOpen :: IrcError

-- | 714
ErrKnockOnChan :: IrcError

-- | 716
ErrTargUmodeG :: IrcError

-- | 723 priv
ErrNoPrivs :: ByteString -> IrcError

-- | 742 mode setting
ErrMlockRestricted :: Char -> ByteString -> IrcError
ircMsgToServerMsg :: RawIrcMsg -> Maybe MsgFromServer
instance Read IrcError
instance Show IrcError
instance Read ChannelType
instance Show ChannelType
instance Read MsgFromServer
instance Show MsgFromServer


-- | Automatically generated <a>Prism</a>s for all of the types in
--   <a>MsgFromServer</a>
module Irc.Core.Prisms
_Account :: Prism' MsgFromServer (UserInfo, Maybe ByteString)
_Authenticate :: Prism' MsgFromServer ByteString
_Error :: Prism' MsgFromServer ByteString
_Invite :: Prism' MsgFromServer (UserInfo, Identifier)
_Part :: Prism' MsgFromServer (UserInfo, Identifier, ByteString)
_Kick :: Prism' MsgFromServer (UserInfo, Identifier, Identifier, ByteString)
_Cap :: Prism' MsgFromServer (ByteString, ByteString)
_Quit :: Prism' MsgFromServer (UserInfo, ByteString)
_Mode :: Prism' MsgFromServer (UserInfo, Identifier, [ByteString])
_Nick :: Prism' MsgFromServer (UserInfo, Identifier)
_Join :: Prism' MsgFromServer (UserInfo, Identifier)
_ExtJoin :: Prism' MsgFromServer (UserInfo, Identifier, Maybe ByteString, ByteString)
_PrivMsg :: Prism' MsgFromServer (UserInfo, Identifier, ByteString)
_Topic :: Prism' MsgFromServer (UserInfo, Identifier, ByteString)
_Notice :: Prism' MsgFromServer (UserInfo, Identifier, ByteString)
_Pong :: Prism' MsgFromServer (ByteString, Maybe ByteString)
_Ping :: Prism' MsgFromServer ByteString
_Away :: Prism' MsgFromServer (UserInfo, Maybe ByteString)
_RplSaslMechs :: Prism' MsgFromServer ByteString
_RplSaslAlready :: Prism' MsgFromServer ()
_RplSaslAborted :: Prism' MsgFromServer ()
_RplSaslTooLong :: Prism' MsgFromServer ()
_RplSaslFail :: Prism' MsgFromServer ()
_RplSaslSuccess :: Prism' MsgFromServer ()
_RplNickLocked :: Prism' MsgFromServer ()
_RplLoggedOut :: Prism' MsgFromServer ()
_RplLoggedIn :: Prism' MsgFromServer ByteString
_RplEndOfQuietList :: Prism' MsgFromServer (Identifier, Char)
_RplQuietList :: Prism' MsgFromServer (Identifier, Char, ByteString, ByteString, UTCTime)
_RplUmodeGMsg :: Prism' MsgFromServer (Identifier, ByteString)
_RplTargNotify :: Prism' MsgFromServer Identifier
_RplKnockDelivered :: Prism' MsgFromServer Identifier
_RplKnock :: Prism' MsgFromServer (Identifier, UserInfo)
_RplEndOfHelp :: Prism' MsgFromServer ByteString
_RplHelp :: Prism' MsgFromServer (ByteString, ByteString)
_RplHelpStart :: Prism' MsgFromServer (ByteString, ByteString)
_RplWhoisSecure :: Prism' MsgFromServer Identifier
_Err :: Prism' MsgFromServer (Identifier, IrcError)
_RplHostHidden :: Prism' MsgFromServer ByteString
_RplYoureOper :: Prism' MsgFromServer ByteString
_RplWhoisModes :: Prism' MsgFromServer (Identifier, ByteString, [ByteString])
_RplWhoisHost :: Prism' MsgFromServer (Identifier, ByteString)
_RplEndOfInfo :: Prism' MsgFromServer ()
_RplInfo :: Prism' MsgFromServer ByteString
_RplTime :: Prism' MsgFromServer (ByteString, ByteString)
_RplEndOfMotd :: Prism' MsgFromServer ()
_RplMotdStart :: Prism' MsgFromServer ()
_RplMotd :: Prism' MsgFromServer ByteString
_RplEndOfWhoWas :: Prism' MsgFromServer Identifier
_RplEndOfBanList :: Prism' MsgFromServer Identifier
_RplBanList :: Prism' MsgFromServer (Identifier, ByteString, ByteString, UTCTime)
_RplEndOfNames :: Prism' MsgFromServer Identifier
_RplEndOfLinks :: Prism' MsgFromServer ByteString
_RplLinks :: Prism' MsgFromServer (ByteString, ByteString, ByteString)
_RplNameReply :: Prism' MsgFromServer (ChannelType, Identifier, [ByteString])
_RplWhoReply :: Prism' MsgFromServer (Identifier, ByteString, ByteString, ByteString, Identifier, ByteString, ByteString)
_RplVersion :: Prism' MsgFromServer [ByteString]
_RplEndOfExceptionList :: Prism' MsgFromServer Identifier
_RplExceptionList :: Prism' MsgFromServer (Identifier, ByteString, ByteString, UTCTime)
_RplEndOfInviteList :: Prism' MsgFromServer Identifier
_RplInviteList :: Prism' MsgFromServer (Identifier, ByteString, ByteString, UTCTime)
_RplInviting :: Prism' MsgFromServer (Identifier, Identifier)
_RplTopicWhoTime :: Prism' MsgFromServer (Identifier, ByteString, UTCTime)
_RplWhoisAccount :: Prism' MsgFromServer (Identifier, ByteString)
_RplCreationTime :: Prism' MsgFromServer (Identifier, UTCTime)
_RplChannelUrl :: Prism' MsgFromServer (Identifier, ByteString)
_RplTopic :: Prism' MsgFromServer (Identifier, ByteString)
_RplNoTopicSet :: Prism' MsgFromServer Identifier
_RplChannelModeIs :: Prism' MsgFromServer (Identifier, ByteString, [ByteString])
_RplListEnd :: Prism' MsgFromServer ()
_RplList :: Prism' MsgFromServer (Identifier, Integer, ByteString)
_RplListStart :: Prism' MsgFromServer ()
_RplWhoisChannels :: Prism' MsgFromServer (Identifier, ByteString)
_RplEndOfWhois :: Prism' MsgFromServer Identifier
_RplWhoisIdle :: Prism' MsgFromServer (Identifier, Integer, Maybe UTCTime)
_RplEndOfWho :: Prism' MsgFromServer Identifier
_RplWhoWasUser :: Prism' MsgFromServer (Identifier, ByteString, ByteString, ByteString)
_RplWhoisOperator :: Prism' MsgFromServer (Identifier, ByteString)
_RplWhoisServer :: Prism' MsgFromServer (Identifier, ByteString, ByteString)
_RplWhoisUser :: Prism' MsgFromServer (Identifier, ByteString, ByteString, ByteString)
_RplNowAway :: Prism' MsgFromServer ()
_RplUnAway :: Prism' MsgFromServer ()
_RplSyntax :: Prism' MsgFromServer ByteString
_RplIsOn :: Prism' MsgFromServer [Identifier]
_RplUserHost :: Prism' MsgFromServer [ByteString]
_RplAway :: Prism' MsgFromServer (Identifier, ByteString)
_RplEndOfAccept :: Prism' MsgFromServer ()
_RplAcceptList :: Prism' MsgFromServer Identifier
_RplWhoisCertFp :: Prism' MsgFromServer (Identifier, ByteString)
_RplPrivs :: Prism' MsgFromServer ByteString
_RplGlobalUsers :: Prism' MsgFromServer [ByteString]
_RplLocalUsers :: Prism' MsgFromServer [ByteString]
_RplLoadTooHigh :: Prism' MsgFromServer ByteString
_RplLuserAdminEmail :: Prism' MsgFromServer ByteString
_RplLuserAdminLoc2 :: Prism' MsgFromServer ByteString
_RplLuserAdminLoc1 :: Prism' MsgFromServer ByteString
_RplLuserAdminMe :: Prism' MsgFromServer ByteString
_RplLuserMe :: Prism' MsgFromServer ByteString
_RplLuserChannels :: Prism' MsgFromServer ByteString
_RplLuserUnknown :: Prism' MsgFromServer ByteString
_RplLuserOp :: Prism' MsgFromServer ByteString
_RplLuserClient :: Prism' MsgFromServer ByteString
_RplStatsConn :: Prism' MsgFromServer ByteString
_RplStatsDebug :: Prism' MsgFromServer [ByteString]
_RplStatsULine :: Prism' MsgFromServer [ByteString]
_RplStatsXLine :: Prism' MsgFromServer [ByteString]
_RplStatsPing :: Prism' MsgFromServer [ByteString]
_RplStatsSLine :: Prism' MsgFromServer [ByteString]
_RplStatsHLine :: Prism' MsgFromServer [ByteString]
_RplStatsOLine :: Prism' MsgFromServer [ByteString]
_RplStatsUptime :: Prism' MsgFromServer ByteString
_RplStatsLLine :: Prism' MsgFromServer [ByteString]
_RplStatsVLine :: Prism' MsgFromServer [ByteString]
_RplStatsDLine :: Prism' MsgFromServer [ByteString]
_RplUmodeIs :: Prism' MsgFromServer (ByteString, [ByteString])
_RplStatsPLine :: Prism' MsgFromServer [ByteString]
_RplEndOfStats :: Prism' MsgFromServer Char
_RplStatsYLine :: Prism' MsgFromServer [ByteString]
_RplStatsQLine :: Prism' MsgFromServer [ByteString]
_RplStatsKLine :: Prism' MsgFromServer [ByteString]
_RplStatsILine :: Prism' MsgFromServer [ByteString]
_RplStatsNLine :: Prism' MsgFromServer [ByteString]
_RplStatsCLine :: Prism' MsgFromServer [ByteString]
_RplStatsCommands :: Prism' MsgFromServer [ByteString]
_RplStatsLinkInfo :: Prism' MsgFromServer [ByteString]
_RplYourId :: Prism' MsgFromServer ByteString
_RplSnoMask :: Prism' MsgFromServer ByteString
_RplISupport :: Prism' MsgFromServer [(ByteString, ByteString)]
_RplMyInfo :: Prism' MsgFromServer (ByteString, ByteString, [ByteString])
_RplCreated :: Prism' MsgFromServer ByteString
_RplYourHost :: Prism' MsgFromServer ByteString
_RplWelcome :: Prism' MsgFromServer ByteString

module Irc.Message

-- | <a>IrcMessage</a> represents a high-level event to be communicated out
--   to the library user when something changes on a connection.
data IrcMessage
IrcMessage :: !IrcMessageType -> !UserInfo -> !UTCTime -> !Bool -> String -> String -> IrcMessage
_mesgType :: IrcMessage -> !IrcMessageType
_mesgSender :: IrcMessage -> !UserInfo
_mesgStamp :: IrcMessage -> !UTCTime
_mesgMe :: IrcMessage -> !Bool
_mesgModes :: IrcMessage -> String
_mesgStatus :: IrcMessage -> String

-- | Event types and associated fields used by <a>IrcMessage</a>.
data IrcMessageType
PrivMsgType :: Text -> IrcMessageType
NoticeMsgType :: Text -> IrcMessageType
ActionMsgType :: Text -> IrcMessageType
AwayMsgType :: Text -> IrcMessageType
JoinMsgType :: IrcMessageType
KickMsgType :: Identifier -> Text -> IrcMessageType
PartMsgType :: Text -> IrcMessageType
QuitMsgType :: Text -> IrcMessageType
NickMsgType :: Identifier -> IrcMessageType
TopicMsgType :: Text -> IrcMessageType
ErrorMsgType :: Text -> IrcMessageType
ErrMsgType :: IrcError -> IrcMessageType
ModeMsgType :: Bool -> Char -> ByteString -> IrcMessageType
InviteMsgType :: IrcMessageType
KnockMsgType :: IrcMessageType
CallerIdMsgType :: IrcMessageType
CallerIdDeliveredMsgType :: IrcMessageType

-- | ctcp command and arguments
CtcpReqMsgType :: ByteString -> ByteString -> IrcMessageType

-- | ctcp command and arguments
CtcpRspMsgType :: ByteString -> ByteString -> IrcMessageType
mesgType :: Lens' IrcMessage IrcMessageType
mesgSender :: Lens' IrcMessage UserInfo
mesgStamp :: Lens' IrcMessage UTCTime
mesgStatus :: Lens' IrcMessage String
mesgMe :: Lens' IrcMessage Bool
mesgModes :: Lens' IrcMessage String
defaultIrcMessage :: IrcMessage
_PrivMsgType :: Prism' IrcMessageType Text
_NoticeMsgType :: Prism' IrcMessageType Text
_ActionMsgType :: Prism' IrcMessageType Text
_AwayMsgType :: Prism' IrcMessageType Text
_JoinMsgType :: Prism' IrcMessageType ()
_KickMsgType :: Prism' IrcMessageType (Identifier, Text)
_PartMsgType :: Prism' IrcMessageType Text
_QuitMsgType :: Prism' IrcMessageType Text
_NickMsgType :: Prism' IrcMessageType Identifier
_TopicMsgType :: Prism' IrcMessageType Text
_ErrorMsgType :: Prism' IrcMessageType Text
_ErrMsgType :: Prism' IrcMessageType IrcError
_ModeMsgType :: Prism' IrcMessageType (Bool, Char, ByteString)
_InviteMsgType :: Prism' IrcMessageType ()
_KnockMsgType :: Prism' IrcMessageType ()
_CallerIdMsgType :: Prism' IrcMessageType ()
_CallerIdDeliveredMsgType :: Prism' IrcMessageType ()
_CtcpReqMsgType :: Prism' IrcMessageType (ByteString, ByteString)
_CtcpRspMsgType :: Prism' IrcMessageType (ByteString, ByteString)
instance Read IrcMessageType
instance Show IrcMessageType
instance Read IrcMessage
instance Show IrcMessage


-- | This module implements a high-level view of the state of the IRC
--   connection. The library user calls <a>advanceModel</a> to step the
--   <a>IrcConnection</a> as new messages arrive.
module Irc.Model

-- | <a>IrcConnection</a> is the state of an IRC connection. It maintains
--   channel membership, user and channel modes, and other connection
--   state.
data IrcConnection
IrcConnection :: !Identifier -> !(Map Identifier IrcChannel) -> Maybe ByteString -> [Char] -> [Char] -> !Bool -> !Int -> Maybe Char -> Maybe Char -> !(Map Identifier IrcUser) -> !ModeTypes -> !ModeTypes -> !Int -> !Int -> Maybe (ByteString, ByteString) -> Maybe (ByteString, ByteString) -> !ByteString -> !ByteString -> !Phase -> IrcConnection
_connNick :: IrcConnection -> !Identifier
_connChannels :: IrcConnection -> !(Map Identifier IrcChannel)
_connId :: IrcConnection -> Maybe ByteString
_connChanTypes :: IrcConnection -> [Char]
_connStatusMsg :: IrcConnection -> [Char]
_connKnock :: IrcConnection -> !Bool
_connNickLen :: IrcConnection -> !Int
_connExcepts :: IrcConnection -> Maybe Char
_connInvex :: IrcConnection -> Maybe Char
_connUsers :: IrcConnection -> !(Map Identifier IrcUser)
_connChanModeTypes :: IrcConnection -> !ModeTypes
_connUserModeTypes :: IrcConnection -> !ModeTypes
_connModes :: IrcConnection -> !Int
_connTopicLen :: IrcConnection -> !Int
_connMyInfo :: IrcConnection -> Maybe (ByteString, ByteString)
_connSasl :: IrcConnection -> Maybe (ByteString, ByteString)
_connUmode :: IrcConnection -> !ByteString
_connSnoMask :: IrcConnection -> !ByteString
_connPhase :: IrcConnection -> !Phase
connNick :: Lens' IrcConnection Identifier
connChannels :: Lens' IrcConnection (Map Identifier IrcChannel)
connId :: Lens' IrcConnection (Maybe ByteString)
connChanModeTypes :: Lens' IrcConnection ModeTypes
connUserModeTypes :: Lens' IrcConnection ModeTypes
connKnock :: Lens' IrcConnection Bool
connNickLen :: Lens' IrcConnection Int
connExcepts :: Lens' IrcConnection (Maybe Char)
connInvex :: Lens' IrcConnection (Maybe Char)
connStatusMsg :: Lens' IrcConnection [Char]
connTopicLen :: Lens' IrcConnection Int
connPhase :: Lens' IrcConnection Phase
connModes :: Lens' IrcConnection Int
connUsers :: Lens' IrcConnection (Map Identifier IrcUser)
connMyInfo :: Lens' IrcConnection (Maybe (ByteString, ByteString))
connSasl :: Lens' IrcConnection (Maybe (ByteString, ByteString))
connUmode :: Lens' IrcConnection ByteString
connSnoMask :: Lens' IrcConnection ByteString

-- | <a>IrcConnection</a> value with everything unspecified
defaultIrcConnection :: IrcConnection
data Phase
RegistrationPhase :: Phase
ActivePhase :: Phase
SaslPhase :: Phase

-- | <a>IrcChannel</a> represents the current state of a channel as seen on
--   the connection. It includes all user lists, modes, and other metadata
--   about a channel.
data IrcChannel
IrcChannel :: Maybe (Maybe (Text, ByteString, UTCTime)) -> !(Map Identifier String) -> Maybe (Map Char ByteString) -> Maybe UTCTime -> Map Char [IrcMaskEntry] -> Maybe ByteString -> IrcChannel
_chanTopic :: IrcChannel -> Maybe (Maybe (Text, ByteString, UTCTime))
_chanUsers :: IrcChannel -> !(Map Identifier String)
_chanModes :: IrcChannel -> Maybe (Map Char ByteString)
_chanCreation :: IrcChannel -> Maybe UTCTime
_chanMaskLists :: IrcChannel -> Map Char [IrcMaskEntry]
_chanUrl :: IrcChannel -> Maybe ByteString
chanTopic :: Lens' IrcChannel (Maybe (Maybe (Text, ByteString, UTCTime)))
chanUsers :: Lens' IrcChannel (Map Identifier String)
chanModes :: Lens' IrcChannel (Maybe (Map Char ByteString))
chanCreation :: Lens' IrcChannel (Maybe UTCTime)
chanMaskLists :: Lens' IrcChannel (Map Char [IrcMaskEntry])
chanUrl :: Lens' IrcChannel (Maybe ByteString)

-- | Settings that describe how to interpret channel modes
data ModeTypes
ModeTypes :: String -> String -> String -> String -> [(Char, Char)] -> ModeTypes
_modesLists :: ModeTypes -> String
_modesAlwaysArg :: ModeTypes -> String
_modesSetArg :: ModeTypes -> String
_modesNeverArg :: ModeTypes -> String
_modesPrefixModes :: ModeTypes -> [(Char, Char)]
modesLists :: Lens' ModeTypes String
modesAlwaysArg :: Lens' ModeTypes String
modesSetArg :: Lens' ModeTypes String
modesNeverArg :: Lens' ModeTypes String
modesPrefixModes :: Lens' ModeTypes [(Char, Char)]

-- | The channel modes used by Freenode
defaultChanModeTypes :: ModeTypes

-- | The default UMODE as defined by Freenode
defaultUmodeTypes :: ModeTypes

-- | Mask entries are used to represent an entry in a ban list for a
--   channel.
data IrcMaskEntry
IrcMaskEntry :: ByteString -> ByteString -> UTCTime -> IrcMaskEntry
_maskEntryMask :: IrcMaskEntry -> ByteString
_maskEntryWho :: IrcMaskEntry -> ByteString
_maskEntryStamp :: IrcMaskEntry -> UTCTime
maskEntryMask :: Lens' IrcMaskEntry ByteString
maskEntryWho :: Lens' IrcMaskEntry ByteString
maskEntryStamp :: Lens' IrcMaskEntry UTCTime

-- | <a>IrcUser</a> is the type of user-level metadata tracked for the
--   users visible on the current IRC connection.
data IrcUser
IrcUser :: !Bool -> !(Maybe ByteString) -> !(Maybe ByteString) -> IrcUser
_usrAway :: IrcUser -> !Bool
_usrAccount :: IrcUser -> !(Maybe ByteString)
_usrHost :: IrcUser -> !(Maybe ByteString)
usrAway :: Lens' IrcUser Bool
usrAccount :: Lens' IrcUser (Maybe ByteString)
usrHost :: Lens' IrcUser (Maybe ByteString)

-- | This represents the metadata of an unknown user.
defaultIrcUser :: IrcUser

-- | Execute the <a>Logic</a> value using a given operation for sending and
--   recieving IRC messages.
runLogic :: (Functor m, Monad m) => UTCTime -> (forall r. LogicOp r -> m r) -> Logic a -> m (Either String a)
data LogicOp r
Expect :: (MsgFromServer -> r) -> LogicOp r
Emit :: ByteString -> r -> LogicOp r
Record :: Identifier -> IrcMessage -> r -> LogicOp r
data Logic a

-- | Primary state machine step function. Call this function with a
--   timestamp and a server message to update the <a>IrcConnection</a>
--   state. If additional messages are required they will be requested via
--   the <a>Logic</a> type.
advanceModel :: MsgFromServer -> IrcConnection -> Logic IrcConnection

-- | Predicate for identifiers to identify which represent channel names.
--   Channel prefixes are configurable, but the most common is <tt>#</tt>
isChannelName :: Identifier -> IrcConnection -> Bool

-- | Predicate for identifiers to identify which represent nicknames
isNickName :: Identifier -> IrcConnection -> Bool

-- | Predicate to determine if a given identifier is the primary nick for
--   the given connection.
isMyNick :: Identifier -> IrcConnection -> Bool
splitStatusMsg :: Identifier -> IrcConnection -> (String, Identifier)

-- | Split up a mode change command and arguments into individual changes
--   given a configuration.
splitModes :: ModeTypes -> ByteString -> [ByteString] -> Maybe [(Bool, Char, ByteString)]
unsplitModes :: [(Bool, Char, ByteString)] -> [ByteString]
nickHasModeInChannel :: Identifier -> Char -> Identifier -> IrcConnection -> Bool
channelHasMode :: Identifier -> Char -> IrcConnection -> Bool
instance Functor LogicOp
instance Functor Logic
instance Applicative Logic
instance Monad Logic
instance Read Phase
instance Show Phase
instance Eq Phase
instance Read ModeTypes
instance Show ModeTypes
instance Read IrcMaskEntry
instance Show IrcMaskEntry
instance Read IrcChannel
instance Show IrcChannel
instance Read IrcUser
instance Show IrcUser
instance Read IrcConnection
instance Show IrcConnection
instance Read a => Read (Fuzzy a)
instance Show a => Show (Fuzzy a)
