I would have suggested using something like the following in a remote script:
Code:
on *:open:?:*: { /whois $target }


But for some reason I can't get on:open events to trigger ( on:close works, though - v7.22 ).