'Tell Sopel to request a capability when it starts.
By prefixing the capability with `-`, it will be ensured that the
capability is not enabled. Simmilarly, by prefixing the capability with
`=`, it will be ensured that the capability is enabled. Requiring and
disabling is "first come, first served"; if one module requires a
capability, and another prohibits it, this function will raise an
exception in whichever module loads second. An exception will also be
raised if the module is being loaded after the bot has already started,
and the request would change the set of enabled capabilities.
If the capability is not prefixed, and no other module prohibits it, it
will be requested.  Otherwise, it will not be requested. Since
capability requests that are not mandatory may be rejected by the
server, as well as by other modules, a module which makes such a
request should account for that possibility.
The actual capability request to the server is handled after the
completion of this function. In the event that the server denies a
request, the `failure_callback` function will be called, if provided.
The arguments will be a `Sopel` object, and the capability which was
rejected. This can be used to disable callables which rely on the
capability. It will be be called either if the server NAKs the request,
or if the server enabled it and later DELs it.
The `success_callback` function will be called upon acknowledgement of
the capability from the server, whether during the initial capability
negotiation, or later.
If ``arg`` is given, and does not exactly match what the server
provides or what other modules have requested for that capability, it is
considered a conflict.'

def cap_req(self, module_name, capability, arg=None, failure_callback=None, success_callback=None):

    cap = capability[1:]
    prefix = capability[0]
    entry = self._cap_reqs.get(cap, [])
    if any(((ent.arg != arg) for ent in entry)):
        raise Exception(u'Capability    conflict')
    if (prefix == u'-'):
        if (self.connection_registered and (cap in self.enabled_capabilities)):
            raise Exception(u'Can    not    change    capabilities    after    server    connection    has    been    completed.')
        if any(((ent.prefix != u'-') for ent in entry)):
            raise Exception(u'Capability    conflict')
        entry.append(_CapReq(prefix, module_name, failure_callback, arg, success_callback))
        self._cap_reqs[cap] = entry
    else:
        if (prefix != u'='):
            cap = capability
            prefix = u''
        if (self.connection_registered and (cap not in self.enabled_capabilities)):
            raise Exception(u'Can    not    change    capabilities    after    server    connection    has    been    completed.')
        if (any(((ent.prefix == u'-') for ent in entry)) and (prefix == u'=')):
            raise Exception(u'Capability    conflict')
        entry.append(_CapReq(prefix, module_name, failure_callback, arg, success_callback))
        self._cap_reqs[cap] = entry
