mIRC Home    About    Download    Register    News    Help

Print Thread
#251843 06/03/15 02:24 PM
Joined: Mar 2015
Posts: 3
G
ghost Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Mar 2015
Posts: 3
There is a nickname that ends with a "_" or "-" (maybe some more characters are affected) and an other user in the same channel has the same nick without that ending. When the user has left the channel or got kicked, then this nick is still clickable and mIRC selects the other one.

#channel members: @me @otherOP aNick aNick- aNick_ otherNicks
-> clicking on nicks in the text area works fine

* aNick- (ident@example) has left #channel
-> double clicking on aNick- opens a query with aNick

* aNick_ was kicked by otherOP (test kick)
-> double clicking on aNick_ opens a query with aNick

mIRC Version: 7.41

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
This is indeed an issue with mIRC's nickname hotlinks. The same behavior can also be observed if someone quits IRC and another user "steals" their nickname. All the old messages that were sent by the first user are clickable and affect the copycat user, because mIRC doesn't perform user-session tracking or security checks against text output.

The reason mIRC will ignore the characters - and _, as in your example when aNick- leaves and only aNick remains, mIRC wants to make sure you can click on nicknames that are surrounded by embellishment characters (non-alpha characters used to make text pretty and formatted). Eg: Notice text. -aNick- Hello!

However, it does have the positive side-effect of following someone whose using their alternate nickname aNick- and then switches to their primary nickname aNick when their old connection times-out or ghosts.

Hard to say how to address this bug, or whether it should be.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Dec 2002
Posts: 5,424
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,424
That is exactly the reason - users asked for the hotlink feature to detect nicknames enclosed in characters such as brackets, hyphens, and so on, in plain text. As there is no clear way to detect what is and is not a link, nickname, channel and so on in this context, this issue is difficult to avoid. The hotlink feature has changed from being too strict or too free with detecting links over the years and has gradually settled on the current behaviour.

Joined: Mar 2015
Posts: 3
G
ghost Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Mar 2015
Posts: 3
Thank you for the explanation. I considered using the "on HOTLINK" event to get the clicked string for a workaround script. But this would open many unwanted querys just by hovering over text, even with the "Shift key enables hotlinks" setting turned on...

A "on HOTLINKCLICK" and "on HOTLINKDOUBLECLICK" event would be nice. smile

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Code:
on *:hotlink:*:#: { 
  if ($hotlink(event) == sclick) { echo -a you just clicked on $1 }
  elseif ($hotlink(event) == rclick) { echo -a you just right clicked on $1 }
}
That should be what you're looking for in this case.
The event for double click is dclick, but obviously s (single) click will occur before a double click can, so you can't use them in the same script anyway.

I'm surprised myself to see that this is not documented in the help files however.
Or was this part of an older scripting style and the newer, using ^ as a prefix is documented in the help files?

Loki was the one who showed me how to use this in this thread the other day


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Mar 2015
Posts: 3
G
ghost Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Mar 2015
Posts: 3
Ok problem solved. Thanks for the hint, Nillen!

Code:
ON 1:PART:#:set %partednick $nick
ON 1:HOTLINK:%partednick:*:if ($hotlink(event) == dclick) { /query $1 }
ON 1:KICK:#:set %kickednick $knick
ON 1:HOTLINK:%kickednick:*:if ($hotlink(event) == dclick) { /query $1 }


Link Copied to Clipboard