With the addition of parseline, scripts can now handle non-standardized CAP modules, but currently there is no way for scripts to register such capabilities with mIRC's native CAP support. The only workaround is to hijack CAP negotiations via parseline events which comes with its own sort of troubles. I suggest adding event handling for CAP negotiations and possibly a way to alter the list of natively supported CAP modules.
on *:CAP:LIST|LS|ACK|NAK:matchtext:{}
LIST|LS|ACK|NAK|ENDThe CAP sub-event to listen for.
Can be a wildcard.
matchtextFor
LIST,
LS,
ACK this is the list of modules the server responded with
For
NAK it is the characters that caused the request to fail
$capeventReturns the CAP sub-event that triggered the event
Only usable from with in the CAP event
/capmodule -x moduleAdds the specified module to the list of modules mIRC will request for the current connection CAP negotiations
-x: removes the specified module
$capmodule(module|n)If the specified module is in the list of CAP modules to request, the module name is returned.
If
n is specified, the nth module to in the list is returned.
Example:
on *:CAP:*:*:{
; check if the network is 'somenet'
; and the cap event is either LS or LIST
if ($network == somenet && ($capevent == LS || $capevent == LIST)) {
; check if 'ModA' is not in the cap module list
; and the server supports ModA
if (!$capmodule(ModA) && ModA isin $1-) {
; add 'ModA' to the list of modules to Request
capmodule ModA
}
; check if 'ModB' is in the list of modules to request
if ($capmodule(ModB)) {
; remove it from the list
capmodule -x ModB
}
}
}