class documentation

class twisted.words.protocols.irc.ServerSupportedFeatures(_CommandDispatcherMixin): (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>.

Class Variable prefix Undocumented
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.
Instance Variable _features Undocumented
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.
def __init__(self): (source)

Undocumented

_features = (source)

Undocumented

@classmethod
def _splitParamArgs(cls, params, valueProcessor=None): (source)

Split ISUPPORT parameter arguments.

Values can optionally be processed by valueProcessor.

For example:

    >>> ServerSupportedFeatures._splitParamArgs(['A:1', 'B:2'])
    (('A', '1'), ('B', '2'))
ParametersparamsUndocumented (type: iterable of str)
valueProcessorCallable to process argument values, or None to perform no processing (type: callable taking {str})
ReturnsSequence of (name, processedValue) (type: list of (str, object))
@classmethod
def _unescapeParamValue(cls, value): (source)

Unescape an ISUPPORT parameter.

The only form of supported escape is \xHH, where HH must be a valid 2-digit hexadecimal number.

ReturnsUndocumented (type: str)
@classmethod
def _splitParam(cls, param): (source)

Split an ISUPPORT parameter.

ParametersparamUndocumented (type: str)
Returns(key, arguments) (type: (str, list))
@classmethod
def _parsePrefixParam(cls, prefix): (source)

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.

ReturnsA 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))
@classmethod
def _parseChanModesParam(self, params): (source)

Parse the ISUPPORT "CHANMODES" parameter.

See isupport_CHANMODES for a detailed explanation of this parameter.

def getFeature(self, feature, default=None): (source)

Get a server supported feature's value.

A feature with the value None is equivalent to the feature being unsupported.

ParametersfeatureFeature name (type: str)
defaultThe value to default to, assuming that feature is not supported (type: object)
ReturnsFeature value
def hasFeature(self, feature): (source)

Determine whether a feature is supported or not.

ReturnsUndocumented (type: bool)
def parse(self, params): (source)

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.

ParametersparamsIterable of ISUPPORT parameters to parse (type: iterable of str)
def isupport_unknown(self, command, params): (source)

Unknown ISUPPORT parameter.

def isupport_CHANLIMIT(self, params): (source)

The maximum number of each channel type a user may join.

def isupport_CHANMODES(self, params): (source)

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.
def isupport_CHANNELLEN(self, params): (source)

Maximum length of a channel name a client may create.

def isupport_CHANTYPES(self, params): (source)

Valid channel prefixes.

def isupport_EXCEPTS(self, params): (source)

Mode character for "ban exceptions".

The presence of this parameter indicates that the server supports this functionality.

def isupport_IDCHAN(self, params): (source)

Safe channel identifiers.

The presence of this parameter indicates that the server supports this functionality.

def isupport_INVEX(self, params): (source)

Mode character for "invite exceptions".

The presence of this parameter indicates that the server supports this functionality.

def isupport_KICKLEN(self, params): (source)

Maximum length of a kick message a client may provide.

def isupport_MAXLIST(self, params): (source)

Maximum number of "list modes" a client may set on a channel at once.

List modes are identified by the "addressModes" key in CHANMODES.

def isupport_MODES(self, params): (source)

Maximum number of modes accepting parameters that may be sent, by a client, in a single MODE command.

def isupport_NETWORK(self, params): (source)

IRC network name.

def isupport_NICKLEN(self, params): (source)

Maximum length of a nickname the client may use.

def isupport_PREFIX(self, params): (source)

Mapping of channel modes that clients may have to status flags.

def isupport_SAFELIST(self, params): (source)

Flag indicating that a client may request a LIST without being disconnected due to the large amount of data generated.

def isupport_STATUSMSG(self, params): (source)

The server supports sending messages to only to clients on a channel with a specific status.

def isupport_TARGMAX(self, params): (source)

Maximum number of targets allowable for commands that accept multiple targets.

def isupport_TOPICLEN(self, params): (source)

Maximum length of a topic that may be set.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.