You can use the on hotlink event to know whenever you are clicking on a nickname, note that you must use a * matchtext first, which will make mIRC triggers the event any single time you move your mouse over text in chat.
Code:
on *:hotlink:*:#:{
if ($hotlink(event) $hotlink(match).type == sclick nick) {
var %n $remove($1,~,&,@,%,+,<,>)
if ($editbox($chan) != $null) editbox -a $v1 %n
else editbox -a $v1 %n $+ :
}
}
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
I forgot to use halt to allow default processing on others situations (can't click links, for example):
Code:
on *:hotlink:*:#:{
if ($hotlink(event) $hotlink(match).type == sclick nick) {
var %n $remove($1,~,&,@,%,+,<,>)
if ($editbox($chan) != $null) editbox -a $v1 %n
else editbox -a $v1 %n $+ :
}
else halt
}
#mircscripting @ irc.swiftirc.net == the best mIRC help channel