Best solution I could think of:
on ^*:HOTLINK:*:@blah:{
if (#* iswm $1) return
if ($1 == blah) set %hotlink_blah $true
else unset %hotlink_blah
halt
}
menu @blah {
$iif(($window($active).type == custom) && (%hotlink_blah),Blahmenu) :blah custom window
$iif(blah isin $1-,Blahmenu) :blah listbox window
}
I'ts far from perfect though:
It will hide the #channel menu, but I couldn't get any other menu to appear.
If @blah is a custom window (/window @blah) and you move your mouse over the word 'blah', the menu will appear everytime you right-click untill you move your mouse over another word, so moving it over white space will not remove the menu.
If @blah is a listbox (/window -l @blah) the menu will appear if 'blah' is anywhere in the line you clicked on