module documentation
(source)

Internet Relay Chat protocol for client and server.

Future Plans

The way the IRCClient class works here encourages people to implement IRC clients by subclassing the ephemeral protocol class, and it tends to end up with way more state than it should for an object which will be destroyed as soon as the TCP transport drops. Someone oughta do something about that, ya know?

The DCC support needs to have more hooks for the client for it to be able to ask the user things like "Do you want to accept this session?" and "Transfer #2 is 67% done." and otherwise manage the DCC sessions.

Test coverage needs to be better.

Author
Kevin Turner
See Also
RFC 1459: Internet Relay Chat Protocol
RFC 2812: Internet Relay Chat: Client Protocol
The Client-To-Client-Protocol
Class ​Dcc​Chat Direct Client Connection protocol type CHAT.
Class ​Dcc​Chat​Factory Undocumented
Class ​Dcc​File​Receive Higher-level coverage for getting a file from DCC SEND.
Class ​Dcc​File​Receive​Basic Bare protocol to receive a Direct Client Connection SEND stream.
Class ​Dcc​Send​Factory Undocumented
Class ​Dcc​Send​Protocol Protocol for an outgoing Direct Client Connection SEND.
Class IRC Internet Relay Chat server protocol.
Class ​IRCBad​Message Undocumented
Class ​IRCBad​Modes A malformed mode was encountered while attempting to parse a mode string.
Class ​IRCClient Internet Relay Chat client protocol, with sprinkles.
Class ​IRCPassword​Mismatch Undocumented
Class ​Server​Supported​Features Handle ISUPPORT messages.
Class ​Unhandled​Command A command dispatcher could not locate an appropriate command handler.
Function assemble​Formatted​Text Assemble formatted text from structured information.
Function ctcp​Dequote Undocumented
Function ctcp​Extract Extract CTCP data from a string.
Function ctcp​Quote Undocumented
Function ctcp​Stringify
Function dcc​Describe Given the data chunk from a DCC query, return a descriptive string.
Function dcc​Parse​Address Undocumented
Function file​Size I'll try my damndest to determine the size of this file object.
Function low​Dequote Undocumented
Function low​Quote Undocumented
Function parse​Formatted​Text Parse text containing IRC formatting codes into structured information.
Function parse​Modes Parse an IRC mode string.
Function parsemsg Breaks a message from an IRC server into its prefix, command, and arguments.
Function split Split a string into multiple lines.
Function strip​Formatting Remove all formatting codes from text, leaving only the text.
Constant CHANNEL​_PREFIXES Undocumented
Constant CR Undocumented
Constant ERR​_ALREADYREGISTRED Undocumented
Constant ERR​_BADCHANMASK Undocumented
Constant ERR​_BADCHANNELKEY Undocumented
Constant ERR​_BADMASK Undocumented
Constant ERR​_BANLISTFULL Undocumented
Constant ERR​_BANNEDFROMCHAN Undocumented
Constant ERR​_CANNOTSENDTOCHAN Undocumented
Constant ERR​_CANTKILLSERVER Undocumented
Constant ERR​_CHANNELISFULL Undocumented
Constant ERR​_CHANOPRIVSNEEDED Undocumented
Constant ERR​_ERRONEUSNICKNAME Undocumented
Constant ERR​_FILEERROR Undocumented
Constant ERR​_INVITEONLYCHAN Undocumented
Constant ERR​_KEYSET Undocumented
Constant ERR​_NEEDMOREPARAMS Undocumented
Constant ERR​_NICKCOLLISION Undocumented
Constant ERR​_NICKNAMEINUSE Undocumented
Constant ERR​_NOADMININFO Undocumented
Constant ERR​_NOCHANMODES Undocumented
Constant ERR​_NOLOGIN Undocumented
Constant ERR​_NOMOTD Undocumented
Constant ERR​_NONICKNAMEGIVEN Undocumented
Constant ERR​_NOOPERHOST Undocumented
Constant ERR​_NOORIGIN Undocumented
Constant ERR​_NOPERMFORHOST Undocumented
Constant ERR​_NOPRIVILEGES Undocumented
Constant ERR​_NORECIPIENT Undocumented
Constant ERR​_NOSERVICEHOST Undocumented
Constant ERR​_NOSUCHCHANNEL Undocumented
Constant ERR​_NOSUCHNICK Undocumented
Constant ERR​_NOSUCHSERVER Undocumented
Constant ERR​_NOSUCHSERVICE Undocumented
Constant ERR​_NOTEXTTOSEND Undocumented
Constant ERR​_NOTONCHANNEL Undocumented
Constant ERR​_NOTOPLEVEL Undocumented
Constant ERR​_NOTREGISTERED Undocumented
Constant ERR​_PASSWDMISMATCH Undocumented
Constant ERR​_RESTRICTED Undocumented
Constant ERR​_SUMMONDISABLED Undocumented
Constant ERR​_TOOMANYCHANNELS Undocumented
Constant ERR​_TOOMANYMATCHES Undocumented
Constant ERR​_TOOMANYTARGETS Undocumented
Constant ERR​_UMODEUNKNOWNFLAG Undocumented
Constant ERR​_UNAVAILRESOURCE Undocumented
Constant ERR​_UNIQOPPRIVSNEEDED Undocumented
Constant ERR​_UNKNOWNCOMMAND Undocumented
Constant ERR​_UNKNOWNMODE Undocumented
Constant ERR​_USERNOTINCHANNEL Undocumented
Constant ERR​_USERONCHANNEL Undocumented
Constant ERR​_USERSDISABLED Undocumented
Constant ERR​_USERSDONTMATCH Undocumented
Constant ERR​_WASNOSUCHNICK Undocumented
Constant ERR​_WILDTOPLEVEL Undocumented
Constant ERR​_YOUREBANNEDCREEP Undocumented
Constant ERR​_YOUWILLBEBANNED Undocumented
Constant M​_QUOTE Undocumented
Constant MAX​_COMMAND​_LENGTH The maximum length of a command, as defined by RFC 2812 section 2.3.
Constant NL Undocumented
Constant NUL Undocumented
Constant RPL​_ADMINEMAIL Undocumented
Constant RPL​_ADMINLOC1 Undocumented
Constant RPL​_ADMINLOC2 Undocumented
Constant RPL​_ADMINME Undocumented
Constant RPL​_AWAY Undocumented
Constant RPL​_BANLIST Undocumented
Constant RPL​_BOUNCE Undocumented
Constant RPL​_CHANNELMODEIS Undocumented
Constant RPL​_CREATED Undocumented
Constant RPL​_ENDOFBANLIST Undocumented
Constant RPL​_ENDOFEXCEPTLIST Undocumented
Constant RPL​_ENDOFINFO Undocumented
Constant RPL​_ENDOFINVITELIST Undocumented
Constant RPL​_ENDOFLINKS Undocumented
Constant RPL​_ENDOFMOTD Undocumented
Constant RPL​_ENDOFNAMES Undocumented
Constant RPL​_ENDOFSTATS Undocumented
Constant RPL​_ENDOFUSERS Undocumented
Constant RPL​_ENDOFWHO Undocumented
Constant RPL​_ENDOFWHOIS Undocumented
Constant RPL​_ENDOFWHOWAS Undocumented
Constant RPL​_EXCEPTLIST Undocumented
Constant RPL​_INFO Undocumented
Constant RPL​_INVITELIST Undocumented
Constant RPL​_INVITING Undocumented
Constant RPL​_ISON Undocumented
Constant RPL​_ISUPPORT Undocumented
Constant RPL​_LINKS Undocumented
Constant RPL​_LIST Undocumented
Constant RPL​_LISTEND Undocumented
Constant RPL​_LISTSTART Undocumented
Constant RPL​_LUSERCHANNELS Undocumented
Constant RPL​_LUSERCLIENT Undocumented
Constant RPL​_LUSERME Undocumented
Constant RPL​_LUSEROP Undocumented
Constant RPL​_LUSERUNKNOWN Undocumented
Constant RPL​_MOTD Undocumented
Constant RPL​_MOTDSTART Undocumented
Constant RPL​_MYINFO Undocumented
Constant RPL​_NAMREPLY Undocumented
Constant RPL​_NOTOPIC Undocumented
Constant RPL​_NOUSERS Undocumented
Constant RPL​_NOWAWAY Undocumented
Constant RPL​_REHASHING Undocumented
Constant RPL​_SERVLIST Undocumented
Constant RPL​_SERVLISTEND Undocumented
Constant RPL​_STATSCOMMANDS Undocumented
Constant RPL​_STATSLINKINFO Undocumented
Constant RPL​_STATSOLINE Undocumented
Constant RPL​_STATSUPTIME Undocumented
Constant RPL​_SUMMONING Undocumented
Constant RPL​_TIME Undocumented
Constant RPL​_TOPIC Undocumented
Constant RPL​_TRACECLASS Undocumented
Constant RPL​_TRACECONNECTING Undocumented
Constant RPL​_TRACEEND Undocumented
Constant RPL​_TRACEHANDSHAKE Undocumented
Constant RPL​_TRACELINK Undocumented
Constant RPL​_TRACELOG Undocumented
Constant RPL​_TRACENEWTYPE Undocumented
Constant RPL​_TRACEOPERATOR Undocumented
Constant RPL​_TRACERECONNECT Undocumented
Constant RPL​_TRACESERVER Undocumented
Constant RPL​_TRACESERVICE Undocumented
Constant RPL​_TRACEUNKNOWN Undocumented
Constant RPL​_TRACEUSER Undocumented
Constant RPL​_TRYAGAIN Undocumented
Constant RPL​_UMODEIS Undocumented
Constant RPL​_UNAWAY Undocumented
Constant RPL​_UNIQOPIS Undocumented
Constant RPL​_USERHOST Undocumented
Constant RPL​_USERS Undocumented
Constant RPL​_USERSSTART Undocumented
Constant RPL​_VERSION Undocumented
Constant RPL​_WELCOME Undocumented
Constant RPL​_WHOISCHANNELS Undocumented
Constant RPL​_WHOISIDLE Undocumented
Constant RPL​_WHOISOPERATOR Undocumented
Constant RPL​_WHOISSERVER Undocumented
Constant RPL​_WHOISUSER Undocumented
Constant RPL​_WHOREPLY Undocumented
Constant RPL​_WHOWASUSER Undocumented
Constant RPL​_YOUREOPER Undocumented
Constant RPL​_YOURESERVICE Undocumented
Constant RPL​_YOURHOST Undocumented
Constant SPC Undocumented
Constant X​_DELIM Undocumented
Constant X​_QUOTE Undocumented
Variable attributes Singleton instance of _CharacterAttributes, used for constructing formatted text information.
Variable m​Dequote​Table Undocumented
Variable m​Escape_re Undocumented
Variable m​Quote​Table Undocumented
Variable numeric​_to​_symbolic Undocumented
Variable symbolic​_to​_numeric Undocumented
Variable x​Dequote​Table Undocumented
Variable x​Escape_re Undocumented
Variable x​Quote​Table Undocumented
Class _​Character​Attributes Factory for character attributes, including foreground and background color and non-color attributes such as bold, reverse video and underline.
Class _​Command​Dispatcher​Mixin Dispatch commands to handlers based on their name.
Class _​Formatting​Parser A finite-state machine that parses formatted IRC text.
Class _​Formatting​State Formatting state/attributes of a single character.
Function _foldr Apply a function of two arguments cumulatively to the items of a sequence, from right to left, so as to reduce the sequence to a single value.
Function _int​Or​Default Convert a value to an integer if possible.
Constant _BOLD Undocumented
Constant _COLOR Undocumented
Constant _IRC​_COLOR​_NAMES Undocumented
Constant _IRC​_COLORS Undocumented
Constant _OFF Undocumented
Constant _REVERSE​_VIDEO Undocumented
Constant _UNDERLINE Undocumented
def assembleFormattedText(formatted): (source)

Assemble formatted text from structured information.

Currently handled formatting includes: bold, reverse, underline, mIRC color codes and the ability to remove all current formatting.

It is worth noting that assembled text will always begin with the control code to disable other attributes for the sake of correctness.

For example:

    from twisted.words.protocols.irc import attributes as A
    assembleFormattedText(
        A.normal[A.bold['Time: '], A.fg.lightRed['Now!']])

Would produce "Time: " in bold formatting, followed by "Now!" with a foreground color of light red and without any additional formatting.

Available attributes are:

  • bold
  • reverseVideo
  • underline

Available colors are:

  1. white
  2. black
  3. blue
  4. green
  5. light red
  6. red
  7. magenta
  8. orange
  9. yellow
  10. light green
  11. cyan
  12. light cyan
  13. light blue
  14. light magenta
  15. gray
  16. light gray
Parameters
formattedStructured text and attributes.
Returns
strString containing mIRC control sequences that mimic those specified by formatted.
See Also
http://www.mirc.co.uk/help/color.txt
Present Since
13.1
def ctcpDequote(s): (source)

Undocumented

def ctcpExtract(message): (source)
Extract CTCP data from a string.
Returns

A dict containing two keys:

  • 'extended': A list of CTCP (tag, data) tuples.
  • 'normal': A list of strings which were not inside a CTCP delimiter.
def ctcpQuote(s): (source)

Undocumented

def ctcpStringify(messages): (source)
Parameters
messages:a list of extended messages. An extended message is a (tag, data) tuple, where 'data' may be None, a string, or a list of strings to be joined with whitespace.Undocumented
Returns
String
def dccDescribe(data): (source)
Given the data chunk from a DCC query, return a descriptive string.
Parameters
data:bytesThe data from a DCC query.
Returns
bytesA descriptive string.
def dccParseAddress(address): (source)

Undocumented

def fileSize(file): (source)
I'll try my damndest to determine the size of this file object.
Parameters
file:io.IOBaseThe file object to determine the size of.
Returns
int or NoneThe size of the file object as an integer if it can be determined, otherwise return None.
def lowDequote(s): (source)

Undocumented

def lowQuote(s): (source)

Undocumented

def parseFormattedText(text): (source)

Parse text containing IRC formatting codes into structured information.

Color codes are mapped from 0 to 15 and wrap around if greater than 15.

Parameters
text:strFormatted text to parse.
Returns
Structured text and attributes.
Present Since
13.1
def parseModes(modes, params, paramModes=('', '')): (source)

Parse an IRC mode string.

The mode string is parsed into two lists of mode changes (added and removed), with each mode change represented as (mode, param) where mode is the mode character, and param is the parameter passed for that mode, or None if no parameter is required.

Parameters
modes:strModes string to parse.
params:listParameters specified along with modes.
param​Modes:(str, str)A pair of strings ((add, remove)) that indicate which modes take parameters when added or removed.
Returns
Two lists of mode changes, one for modes added and the other for modes removed respectively, mode changes in each list are represented as (mode, param).
def parsemsg(s): (source)
Breaks a message from an IRC server into its prefix, command, and arguments.
Parameters
s:bytesThe message to break.
Returns
tupleA tuple of (prefix, command, args).
def split(str, length=80): (source)

Split a string into multiple lines.

Whitespace near str[length] will be preferred as a breaking point. "\n" will also be used as a breaking point.

Parameters
str:strThe string to split.
length:intThe maximum length which will be allowed for any string in the result.
Returns
list of str
def stripFormatting(text): (source)
Remove all formatting codes from text, leaving only the text.
Parameters
text:strFormatted text to parse.
Returns
strPlain text without any control sequences.
Present Since
13.1
CHANNEL_PREFIXES: str = (source)

Undocumented

Value
'&#!+'

Undocumented

Value
chr(13)
ERR_ALREADYREGISTRED: str = (source)

Undocumented

Value
'462'
ERR_BADCHANMASK: str = (source)

Undocumented

Value
'476'
ERR_BADCHANNELKEY: str = (source)

Undocumented

Value
'475'
ERR_BADMASK: str = (source)

Undocumented

Value
'415'
ERR_BANLISTFULL: str = (source)

Undocumented

Value
'478'
ERR_BANNEDFROMCHAN: str = (source)

Undocumented

Value
'474'
ERR_CANNOTSENDTOCHAN: str = (source)

Undocumented

Value
'404'
ERR_CANTKILLSERVER: str = (source)

Undocumented

Value
'483'
ERR_CHANNELISFULL: str = (source)

Undocumented

Value
'471'
ERR_CHANOPRIVSNEEDED: str = (source)

Undocumented

Value
'482'
ERR_ERRONEUSNICKNAME: str = (source)

Undocumented

Value
'432'
ERR_FILEERROR: str = (source)

Undocumented

Value
'424'
ERR_INVITEONLYCHAN: str = (source)

Undocumented

Value
'473'
ERR_KEYSET: str = (source)

Undocumented

Value
'467'
ERR_NEEDMOREPARAMS: str = (source)

Undocumented

Value
'461'
ERR_NICKCOLLISION: str = (source)

Undocumented

Value
'436'
ERR_NICKNAMEINUSE: str = (source)

Undocumented

Value
'433'
ERR_NOADMININFO: str = (source)

Undocumented

Value
'423'
ERR_NOCHANMODES: str = (source)

Undocumented

Value
'477'
ERR_NOLOGIN: str = (source)

Undocumented

Value
'444'
ERR_NOMOTD: str = (source)

Undocumented

Value
'422'
ERR_NONICKNAMEGIVEN: str = (source)

Undocumented

Value
'431'
ERR_NOOPERHOST: str = (source)

Undocumented

Value
'491'
ERR_NOORIGIN: str = (source)

Undocumented

Value
'409'
ERR_NOPERMFORHOST: str = (source)

Undocumented

Value
'463'
ERR_NOPRIVILEGES: str = (source)

Undocumented

Value
'481'
ERR_NORECIPIENT: str = (source)

Undocumented

Value
'411'
ERR_NOSERVICEHOST: str = (source)

Undocumented

Value
'492'
ERR_NOSUCHCHANNEL: str = (source)

Undocumented

Value
'403'
ERR_NOSUCHNICK: str = (source)

Undocumented

Value
'401'
ERR_NOSUCHSERVER: str = (source)

Undocumented

Value
'402'
ERR_NOSUCHSERVICE: str = (source)

Undocumented

Value
'408'
ERR_NOTEXTTOSEND: str = (source)

Undocumented

Value
'412'
ERR_NOTONCHANNEL: str = (source)

Undocumented

Value
'442'
ERR_NOTOPLEVEL: str = (source)

Undocumented

Value
'413'
ERR_NOTREGISTERED: str = (source)

Undocumented

Value
'451'
ERR_PASSWDMISMATCH: str = (source)

Undocumented

Value
'464'
ERR_RESTRICTED: str = (source)

Undocumented

Value
'484'
ERR_SUMMONDISABLED: str = (source)

Undocumented

Value
'445'
ERR_TOOMANYCHANNELS: str = (source)

Undocumented

Value
'405'
ERR_TOOMANYMATCHES: str = (source)

Undocumented

Value
'416'
ERR_TOOMANYTARGETS: str = (source)

Undocumented

Value
'407'
ERR_UMODEUNKNOWNFLAG: str = (source)

Undocumented

Value
'501'
ERR_UNAVAILRESOURCE: str = (source)

Undocumented

Value
'437'
ERR_UNIQOPPRIVSNEEDED: str = (source)

Undocumented

Value
'485'
ERR_UNKNOWNCOMMAND: str = (source)

Undocumented

Value
'421'
ERR_UNKNOWNMODE: str = (source)

Undocumented

Value
'472'
ERR_USERNOTINCHANNEL: str = (source)

Undocumented

Value
'441'
ERR_USERONCHANNEL: str = (source)

Undocumented

Value
'443'
ERR_USERSDISABLED: str = (source)

Undocumented

Value
'446'
ERR_USERSDONTMATCH: str = (source)

Undocumented

Value
'502'
ERR_WASNOSUCHNICK: str = (source)

Undocumented

Value
'406'
ERR_WILDTOPLEVEL: str = (source)

Undocumented

Value
'414'
ERR_YOUREBANNEDCREEP: str = (source)

Undocumented

Value
'465'
ERR_YOUWILLBEBANNED: str = (source)

Undocumented

Value
'466'
M_QUOTE = (source)

Undocumented

Value
chr(16)
MAX_COMMAND_LENGTH: int = (source)
The maximum length of a command, as defined by RFC 2812 section 2.3.
Value
512

Undocumented

Value
chr(10)

Undocumented

Value
chr(0)
RPL_ADMINEMAIL: str = (source)

Undocumented

Value
'259'
RPL_ADMINLOC1: str = (source)

Undocumented

Value
'257'
RPL_ADMINLOC2: str = (source)

Undocumented

Value
'258'
RPL_ADMINME: str = (source)

Undocumented

Value
'256'
RPL_AWAY: str = (source)

Undocumented

Value
'301'
RPL_BANLIST: str = (source)

Undocumented

Value
'367'
RPL_BOUNCE: str = (source)

Undocumented

Value
'010'
RPL_CHANNELMODEIS: str = (source)

Undocumented

Value
'324'
RPL_CREATED: str = (source)

Undocumented

Value
'003'
RPL_ENDOFBANLIST: str = (source)

Undocumented

Value
'368'
RPL_ENDOFEXCEPTLIST: str = (source)

Undocumented

Value
'349'
RPL_ENDOFINFO: str = (source)

Undocumented

Value
'374'
RPL_ENDOFINVITELIST: str = (source)

Undocumented

Value
'347'
RPL_ENDOFLINKS: str = (source)

Undocumented

Value
'365'
RPL_ENDOFMOTD: str = (source)

Undocumented

Value
'376'
RPL_ENDOFNAMES: str = (source)

Undocumented

Value
'366'
RPL_ENDOFSTATS: str = (source)

Undocumented

Value
'219'
RPL_ENDOFUSERS: str = (source)

Undocumented

Value
'394'
RPL_ENDOFWHO: str = (source)

Undocumented

Value
'315'
RPL_ENDOFWHOIS: str = (source)

Undocumented

Value
'318'
RPL_ENDOFWHOWAS: str = (source)

Undocumented

Value
'369'
RPL_EXCEPTLIST: str = (source)

Undocumented

Value
'348'
RPL_INFO: str = (source)

Undocumented

Value
'371'
RPL_INVITELIST: str = (source)

Undocumented

Value
'346'
RPL_INVITING: str = (source)

Undocumented

Value
'341'
RPL_ISON: str = (source)

Undocumented

Value
'303'
RPL_ISUPPORT: str = (source)

Undocumented

Value
'005'
RPL_LINKS: str = (source)

Undocumented

Value
'364'
RPL_LIST: str = (source)

Undocumented

Value
'322'
RPL_LISTEND: str = (source)

Undocumented

Value
'323'
RPL_LISTSTART: str = (source)

Undocumented

Value
'321'
RPL_LUSERCHANNELS: str = (source)

Undocumented

Value
'254'
RPL_LUSERCLIENT: str = (source)

Undocumented

Value
'251'
RPL_LUSERME: str = (source)

Undocumented

Value
'255'
RPL_LUSEROP: str = (source)

Undocumented

Value
'252'
RPL_LUSERUNKNOWN: str = (source)

Undocumented

Value
'253'
RPL_MOTD: str = (source)

Undocumented

Value
'372'
RPL_MOTDSTART: str = (source)

Undocumented

Value
'375'
RPL_MYINFO: str = (source)

Undocumented

Value
'004'
RPL_NAMREPLY: str = (source)

Undocumented

Value
'353'
RPL_NOTOPIC: str = (source)

Undocumented

Value
'331'
RPL_NOUSERS: str = (source)

Undocumented

Value
'395'
RPL_NOWAWAY: str = (source)

Undocumented

Value
'306'
RPL_REHASHING: str = (source)

Undocumented

Value
'382'
RPL_SERVLIST: str = (source)

Undocumented

Value
'234'
RPL_SERVLISTEND: str = (source)

Undocumented

Value
'235'
RPL_STATSCOMMANDS: str = (source)

Undocumented

Value
'212'
RPL_STATSLINKINFO: str = (source)

Undocumented

Value
'211'
RPL_STATSOLINE: str = (source)

Undocumented

Value
'243'
RPL_STATSUPTIME: str = (source)

Undocumented

Value
'242'
RPL_SUMMONING: str = (source)

Undocumented

Value
'342'
RPL_TIME: str = (source)

Undocumented

Value
'391'
RPL_TOPIC: str = (source)

Undocumented

Value
'332'
RPL_TRACECLASS: str = (source)

Undocumented

Value
'209'
RPL_TRACECONNECTING: str = (source)

Undocumented

Value
'201'
RPL_TRACEEND: str = (source)

Undocumented

Value
'262'
RPL_TRACEHANDSHAKE: str = (source)

Undocumented

Value
'202'
RPL_TRACELINK: str = (source)

Undocumented

Value
'200'
RPL_TRACELOG: str = (source)

Undocumented

Value
'261'
RPL_TRACENEWTYPE: str = (source)

Undocumented

Value
'208'
RPL_TRACEOPERATOR: str = (source)

Undocumented

Value
'204'
RPL_TRACERECONNECT: str = (source)

Undocumented

Value
'210'
RPL_TRACESERVER: str = (source)

Undocumented

Value
'206'
RPL_TRACESERVICE: str = (source)

Undocumented

Value
'207'
RPL_TRACEUNKNOWN: str = (source)

Undocumented

Value
'203'
RPL_TRACEUSER: str = (source)

Undocumented

Value
'205'
RPL_TRYAGAIN: str = (source)

Undocumented

Value
'263'
RPL_UMODEIS: str = (source)

Undocumented

Value
'221'
RPL_UNAWAY: str = (source)

Undocumented

Value
'305'
RPL_UNIQOPIS: str = (source)

Undocumented

Value
'325'
RPL_USERHOST: str = (source)

Undocumented

Value
'302'
RPL_USERS: str = (source)

Undocumented

Value
'393'
RPL_USERSSTART: str = (source)

Undocumented

Value
'392'
RPL_VERSION: str = (source)

Undocumented

Value
'351'
RPL_WELCOME: str = (source)

Undocumented

Value
'001'
RPL_WHOISCHANNELS: str = (source)

Undocumented

Value
'319'
RPL_WHOISIDLE: str = (source)

Undocumented

Value
'317'
RPL_WHOISOPERATOR: str = (source)

Undocumented

Value
'313'
RPL_WHOISSERVER: str = (source)

Undocumented

Value
'312'
RPL_WHOISUSER: str = (source)

Undocumented

Value
'311'
RPL_WHOREPLY: str = (source)

Undocumented

Value
'352'
RPL_WHOWASUSER: str = (source)

Undocumented

Value
'314'
RPL_YOUREOPER: str = (source)

Undocumented

Value
'381'
RPL_YOURESERVICE: str = (source)

Undocumented

Value
'383'
RPL_YOURHOST: str = (source)

Undocumented

Value
'002'

Undocumented

Value
chr(32)
X_DELIM = (source)

Undocumented

Value
chr(1)
X_QUOTE: str = (source)

Undocumented

Value
'\\'
attributes = (source)
Singleton instance of _CharacterAttributes, used for constructing formatted text information.
mDequoteTable: dict = (source)

Undocumented

mEscape_re = (source)

Undocumented

mQuoteTable = (source)

Undocumented

numeric_to_symbolic: dict = (source)

Undocumented

symbolic_to_numeric: dict[str, str] = (source)

Undocumented

xDequoteTable: dict = (source)

Undocumented

xEscape_re = (source)

Undocumented

xQuoteTable = (source)

Undocumented

def _foldr(f, z, xs): (source)
Apply a function of two arguments cumulatively to the items of a sequence, from right to left, so as to reduce the sequence to a single value.
Parameters
f:callable taking 2 argumentsUndocumented
zInitial value.
xsSequence to reduce.
Returns
Single value resulting from reducing xs.
def _intOrDefault(value, default=None): (source)
Convert a value to an integer if possible.
Returns
int or type of defaultAn integer when value can be converted to an integer, otherwise return default
_BOLD: str = (source)

Undocumented

Value
'\x02'
_COLOR: str = (source)

Undocumented

Value
'\x03'
_IRC_COLOR_NAMES = (source)

Undocumented

Value
{code: name for name, code in _IRC_COLORS.items()}
_IRC_COLORS = (source)

Undocumented

Value
dict(zip(['white',
          'black',
          'blue',
          'green',
          'lightRed',
          'red',
          'magenta',
...
_OFF: str = (source)

Undocumented

Value
'\x0f'
_REVERSE_VIDEO: str = (source)

Undocumented

Value
'\x16'
_UNDERLINE: str = (source)

Undocumented

Value
'\x1f'