Add the nick(s) in question to your notify list (/notify nick) and use $notify(nick).ison to tell whether they are online.