Part of twisted.words.protocols View Source
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 |
Variable | MAX_COMMAND_LENGTH | The maximum length of a command, as defined by RFC 2812 section 2.3. |
Class | IRCBadMessage | Undocumented |
Class | IRCPasswordMismatch | Undocumented |
Class | IRCBadModes | A malformed mode was encountered while attempting to parse a 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. |
Class | UnhandledCommand | A command dispatcher could not locate an appropriate command handler. |
Function | parseModes | Parse an IRC mode string. |
Class | IRC | Internet Relay Chat server protocol. |
Class | ServerSupportedFeatures | Handle ISUPPORT messages. |
Class | IRCClient | Internet Relay Chat client protocol, with sprinkles. |
Function | dccParseAddress | Undocumented |
Class | DccFileReceiveBasic | Bare protocol to receive a Direct Client Connection SEND stream. |
Class | DccSendProtocol | Protocol for an outgoing Direct Client Connection SEND. |
Class | DccSendFactory | Undocumented |
Function | fileSize | I'll try my damndest to determine the size of this file object. |
Class | DccChat | Direct Client Connection protocol type CHAT. |
Class | DccChatFactory | Undocumented |
Function | dccDescribe | Given the data chunk from a DCC query, return a descriptive string. |
Class | DccFileReceive | Higher-level coverage for getting a file from DCC SEND. |
Function | ctcpExtract | Extract CTCP data from a string. |
Function | lowQuote | Undocumented |
Function | lowDequote | Undocumented |
Function | ctcpQuote | Undocumented |
Function | ctcpDequote | Undocumented |
Function | ctcpStringify | |
Function | _intOrDefault | Convert a value to an integer if possible. |
Class | _CommandDispatcherMixin | Dispatch commands to handlers based on their name. |
Whitespace near str[length]
will be preferred as a breaking
point. "\n"
will also be used as a breaking
point.
Parameters | str | The string to split. (type: str ) |
length | The maximum length which will be allowed for any string in the result. (type: int ) | |
Returns | list of str |
Returns | An integer when value can be converted to an integer,
otherwise return default (type: int or type of default ) |
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 | Modes string to parse. (type: str ) |
params | Parameters specified along with modes . (type: list ) | |
paramModes | A pair of strings ((add, remove) ) that indicate which modes
take parameters when added or removed. (type: (str, str) ) | |
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) . |
Returns | A dict containing two keys:
|