Tokenization through /debug seems to break CAP neg - 01/03/15 08:22 PM
So, I had an issue with mIRC and ZNC, the issue being that mIRC did not request the znc.in/server-time-iso CAP when connecting to ZNC. I finally tracked down the issue as to why it didn't, and it turns out mIRC didn't request the multi-prefix CAP either because of this.
I have a script that is processing /debug output, now here comes the problem: I use /tokenize in that script and it seems to break CAP negotiation. Using $gettok to try to get around the problem and use variables instead also breaks CAP negotiation.
When I disable this script mIRC will happily request these 3 CAPs: userhost-in-names multi-prefix znc.in/server-time-iso when they appear in CAP LS. When I enable this script again mIRC will only request userhost-in-names, eventhough the other CAPs are still listed in LS. Very strange.
Here is a sample script that demonstrates this bug:
Then, execute this command:
And then connect to ZNC.
Here is sample debug output when its breaking:
And here is sample debug output when its working correctly (when commenting out that var line in the debugtest alias):
I'm using mIRC 7.41.
I have a script that is processing /debug output, now here comes the problem: I use /tokenize in that script and it seems to break CAP negotiation. Using $gettok to try to get around the problem and use variables instead also breaks CAP negotiation.
When I disable this script mIRC will happily request these 3 CAPs: userhost-in-names multi-prefix znc.in/server-time-iso when they appear in CAP LS. When I enable this script again mIRC will only request userhost-in-names, eventhough the other CAPs are still listed in LS. Very strange.
Here is a sample script that demonstrates this bug:
Code:
alias debugtest { var %inout = $gettok($1,1,32) return $1 }
Then, execute this command:
Code:
debug -i @debugwindow debugtest
And then connect to ZNC.
Here is sample debug output when its breaking:
Code:
-> znc.ip.znc.ip CAP LS -> znc.ip.znc.ip PASS mysecretpassword -> znc.ip.znc.ip NICK BenderUnit -> znc.ip.znc.ip USER benderunit 0 * :BenderUnit <- :irc.znc.in CAP unknown-nick LS :userhost-in-names multi-prefix znc.in/server-time-iso znc.in/batch znc.in/self-message -> znc.ip.znc.ip CAP REQ :userhost-in-names <- :irc.znc.in CAP BenderUnit ACK :userhost-in-names -> znc.ip.znc.ip CAP END
And here is sample debug output when its working correctly (when commenting out that var line in the debugtest alias):
Code:
-> znc.ip.znc.ip CAP LS -> znc.ip.znc.ip PASS mysecretpassword -> znc.ip.znc.ip NICK BenderUnit -> znc.ip.znc.ip USER benderunit 0 * :BenderUnit <- :irc.znc.in CAP unknown-nick LS :userhost-in-names multi-prefix znc.in/server-time-iso znc.in/batch znc.in/self-message -> znc.ip.znc.ip CAP REQ :userhost-in-names -> znc.ip.znc.ip CAP REQ :multi-prefix -> znc.ip.znc.ip CAP REQ :znc.in/server-time-iso <- :irc.znc.in CAP BenderUnit ACK :userhost-in-names <- :irc.znc.in CAP BenderUnit ACK :multi-prefix <- :irc.znc.in CAP BenderUnit ACK :znc.in/server-time-iso -> znc.ip.znc.ip CAP END
I'm using mIRC 7.41.