Part of twisted.words.protocols.irc View Source View In Hierarchy
Handle ISUPPORT messages.
Feature names match those in the ISUPPORT RFC draft identically.
Information regarding the specifics of ISUPPORT was gleaned from <http://www.irc.org/tech_docs/draft-brocklesby-irc-isupport-03.txt>.Method | __init__ | Undocumented |
Method | getFeature | Get a server supported feature's value. |
Method | hasFeature | Determine whether a feature is supported or not. |
Method | parse | Parse ISUPPORT parameters. |
Method | isupport_unknown | Unknown ISUPPORT parameter. |
Method | isupport_CHANLIMIT | The maximum number of each channel type a user may join. |
Method | isupport_CHANMODES | Available channel modes. |
Method | isupport_CHANNELLEN | Maximum length of a channel name a client may create. |
Method | isupport_CHANTYPES | Valid channel prefixes. |
Method | isupport_EXCEPTS | Mode character for "ban exceptions". |
Method | isupport_IDCHAN | Safe channel identifiers. |
Method | isupport_INVEX | Mode character for "invite exceptions". |
Method | isupport_KICKLEN | Maximum length of a kick message a client may provide. |
Method | isupport_MAXLIST | Maximum number of "list modes" a client may set on a channel at once. |
Method | isupport_MODES | Maximum number of modes accepting parameters that may be sent, by a client, in a single MODE command. |
Method | isupport_NETWORK | IRC network name. |
Method | isupport_NICKLEN | Maximum length of a nickname the client may use. |
Method | isupport_PREFIX | Mapping of channel modes that clients may have to status flags. |
Method | isupport_SAFELIST | Flag indicating that a client may request a LIST without being disconnected due to the large amount of data generated. |
Method | isupport_STATUSMSG | The server supports sending messages to only to clients on a channel with a specific status. |
Method | isupport_TARGMAX | Maximum number of targets allowable for commands that accept multiple targets. |
Method | isupport_TOPICLEN | Maximum length of a topic that may be set. |
Class Method | _splitParamArgs | Split ISUPPORT parameter arguments. |
Class Method | _unescapeParamValue | Unescape an ISUPPORT parameter. |
Class Method | _splitParam | Split an ISUPPORT parameter. |
Class Method | _parsePrefixParam | Parse the ISUPPORT "PREFIX" parameter. |
Class Method | _parseChanModesParam | Parse the ISUPPORT "CHANMODES" parameter. |
Inherited from _CommandDispatcherMixin:
Method | dispatch | Perform actual command dispatch. |
Split ISUPPORT parameter arguments.
Values can optionally be processed by valueProcessor
.
>>> ServerSupportedFeatures._splitParamArgs(['A:1', 'B:2']) (('A', '1'), ('B', '2'))
Parameters | params | (type: iterable of str
) |
valueProcessor | Callable to process argument values, or None to perform no
processing
(type: callable taking {str}
) | |
Returns | Sequence of (name, processedValue)
(type: list of (str, object)
) |
Unescape an ISUPPORT parameter.
The only form of supported escape is\xHH
, where HH must be
a valid 2-digit hexadecimal number.
Returns | (type: str
) |
Parameters | param | (type: str
) |
Returns | (type: (str, list) @return (key, arguments)
) |
Parse the ISUPPORT "PREFIX" parameter.
The order in which the parameter arguments appear is significant, the earlier a mode appears the more privileges it gives.Returns | A dictionary mapping a mode character to a two-tuple of C({symbol,
priority)}, the lower a priority (the lowest being 0 ) the more
privileges it gives
(type: dict mapping str to (str,
int)
) |
Parse the ISUPPORT "CHANMODES" parameter.
Seeisupport_CHANMODES
for a detailed explanation of this parameter.
Get a server supported feature's value.
A feature with the valueNone
is equivalent to the feature
being unsupported.
Parameters | feature | Feature name
(type: str
) |
default | The value to default to, assuming that feature is not
supported
(type: object
) | |
Returns | Feature value |
Returns | (type: bool
) |
Parse ISUPPORT parameters.
If an unknown parameter is encountered, it is simply added to the dictionary, keyed by its name, as a tuple of the parameters provided.Parameters | params | Iterable of ISUPPORT parameters to parse
(type: iterable of str
) |
Available channel modes.
There are 4 categories of channel mode:addressModes - Modes that add or remove an address to or from a list, these modes always take a parameter. param - Modes that change a setting on a channel, these modes always take a parameter. setParam - Modes that change a setting on a channel, these modes only take a parameter when being set. noParam - Modes that change a setting on a channel, these modes never take a parameter.
Mode character for "ban exceptions".
The presence of this parameter indicates that the server supports this functionality.Safe channel identifiers.
The presence of this parameter indicates that the server supports this functionality.Mode character for "invite exceptions".
The presence of this parameter indicates that the server supports this functionality.Maximum number of "list modes" a client may set on a channel at once.
List modes are identified by the "addressModes" key in CHANMODES.