mIRC Home    About    Download    Register    News    Help

Print Thread
Send CAP request for userhost-in-names on connect #244542 08/03/14 04:17 PM
Joined: May 2010
Posts: 39
B
BenderUnit Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: May 2010
Posts: 39
It would be a nice addition to the next mIRC version to also request the userhost-in-names (UHNAMES) CAP upon connecting to servers. At the moment it only does a request for the multi-prefix (NAMESX) capability.

I'm currently using a small script to circumvent the issue, but since mIRC supports UHNAMES natively anyway, it makes sense to implement this in the CAP request aswell.

Re: Send CAP request for userhost-in-names on connect [Re: BenderUnit] #244617 14/03/14 08:52 PM
Joined: Dec 2002
Posts: 4,521
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,521
The latest version of mIRC (v7.32) supports both NAMESX and UHNAMES and should enable them automatically if the server indicates that it supports them in ISUPPORT numeric 005. Is the server you are using including UHNAMES in numeric 005?

Re: Send CAP request for userhost-in-names on connect [Re: Khaled] #244639 16/03/14 12:15 AM
Joined: May 2010
Posts: 39
B
BenderUnit Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: May 2010
Posts: 39
Actually, I'm connecting to a bouncer which supports both the PROTOCTL and CAP commands (to accommodate any client that connects through it so it does not send a NAMES-format that the client does not understand anyway).

Though it does not send an ISUPPORT/005 of its own, but simply forwards that of the server it is connected to, which indeed includes UHNAMES in it, but there is where a race condition is happening: mIRC sends out the PROTOCTL command to enable UHNAMES, and at the same time the bouncer is already sending the channel joins.

They suggested mIRC should simply request the 'userhost-in-names' CAP upon connection to avoid and eliminate the race condition.

Re: Send CAP request for userhost-in-names on connect [Re: BenderUnit] #244643 16/03/14 06:02 AM
Joined: Feb 2011
Posts: 315
K
KindOne Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Feb 2011
Posts: 315


irc.swiftirc.net #msl (mIRC Scripting Language)
Re: Send CAP request for userhost-in-names on connect [Re: BenderUnit] #244644 16/03/14 12:26 PM
Joined: Dec 2002
Posts: 4,521
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,521
I will add CAP support for this option to the next version. However, ISUPPORT changes the way a client works in many different ways. A bouncer should ideally wait for a few seconds after the MOTD is sent (which is what mIRC does) before initiating methods such as joining channels. This allows a client to process both CAP and ISUPPORT properly. The only other option would be to move every ISUPPORT feature into CAP to prevent similar issues in future.

Re: Send CAP request for userhost-in-names on connect [Re: Khaled] #244661 17/03/14 05:28 PM
Joined: Mar 2008
Posts: 87
B
BhaaL Offline
Babel fish
Offline
Babel fish
B
Joined: Mar 2008
Posts: 87
Does that just include userhost-in-names, or a more general customization of CAP?
Right now, in order to do SASL Authentication for example, one has to add events for on LOGON in order to get some custom CAPs added to the ACK (at least thats what I noticed while writing my SASL script). Initially, I thought I could just piggyback and wait for the CAP LS reply, but mIRC got ahead of me and sent its ACK/END before mine got through. And thats pretty much what I've seen with the other scripts (such as sasl and sasl-lite from Freenode).
Unless I did something wrong there, I can only imagine that adding scripts to deal with other CAPs would involve the same.