Fortunately, mIRC has this tab called users.
If you press Alt-R, and then go to the Users tab, you can add any number of users and give them a "level". For example, you could enter:
friend:johnny!*@*
And then everyone with the nickname "johnny" will be considered a "friend". You can also use someone's site, or part of a site:
friend:*!*@*.nl
that would make anyone who's site ends on ".nl" a "friend". You could post both lines:
friend:johnny!*@*
friend:*!*@*.nl
Which would make johnny and everyone from .nl a "friend".
Then go to the remote tab, where you can make certain scripts trigger for friends only:
on friend:join:#homies: {
msg $chan Hey, $nick $+ . Long time no see!
}
That would run the script for everyone who is listed as a "friend" and joins the #homies channel. You could use # instead of #homies to make your script affect all channels, but not everyone will appreciate you autospamming in channels. An alternative would be:
on friend:join:#: {
if $me isop $chan {
msg $chan Hey, $nick $+ . Long time no see!
}
}
The "if $me isop $chan" part would make it only execute in channels where you have operator status.