mIRC Home    About    Download    Register    News    Help

Print Thread
#235450 19/12/11 12:41 PM
Joined: Oct 2010
Posts: 28
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Oct 2010
Posts: 28
Heya,
Present in both 7.17 and on 7.22 mircs both tested blank.
Ircd used is InspIRCd-2.0

353 buttons = #Armenia CalImedaddy!colloquyuser@8AF02B.C1A221.808DCB.94A31E
311 buttons calImedaddy colloquyuser 8AF02B.C1A221.808DCB.94A31E * :Colloquy User
302 buttons :calImedaddy=+colloquyuser@8AF02B.C1A221.808DCB.94A31E

but when i do //echo -s $address(calImedaddy,5) i get this:
calImedaddy!lloquyuser@8AF02B.C1A221.808DCB.94A31E

even after doing /who and /names it is still displaying the username incorrectly.

Desolator #235451 19/12/11 01:04 PM
Joined: Oct 2010
Posts: 28
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Oct 2010
Posts: 28
Ok so its not the ial coz the ial is returning the full information correctly but the $address still doesn't, sorry for any confusion.

Desolator #235453 19/12/11 02:18 PM
Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
Many (most?) IRCds will limit the "user" field to 10 characters, so this is why $address() truncates it to 10. The primary purpose of $address() is to generate wildcard masks for purposes like banning a user. If your network supports usernames longer than 10 characters, you need to avoid using $address(nick,5) and instead use $ial(nick) in all situations.

To understand exactly why mIRC does what it does, you'd need to consider a situation like this: You want to ban user joe!abcdefghij@somehost.com from your channel, but want to make sure he still can't get in even if he disables identd. So you attempt to do: /mode #channel +b *!*abcdefghij@somehost.com

Now unfortunately, IRCds are stupid and limit the user field in ban masks to 10 characters too (including wildcard characters), so it will truncate it from the left and actually set a ban for *!*abcdefghi@somehost.com which doesn't even match the user you are trying to ban in the first place. To counter this, mIRC automatically "corrects" it to *!*bcdefghij@somehost.com when you let it set the ban so that the server won't truncate it and the ban will actually match the user you want to ban.

Now, mIRC does make the assumption that the username is never longer than 10 characters when it does this, so admittedly it can cause problems when it is longer than 10 characters. It's sort of a workaround that isn't perfect but is probably more useful than detrimental.

I suppose you could get the best of both worlds by changing $address() and $mask() so they only truncate when a wildcard is present in the user field.

Last edited by drum; 19/12/11 02:23 PM.
drum #235455 19/12/11 04:09 PM
Joined: Oct 2010
Posts: 28
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Oct 2010
Posts: 28
Ty for that drum, it makes sense its too bad this isn't documented in the mirc help file though, *pokes Khaled



Link Copied to Clipboard