Yes, I know about that, but thats only usefull if you want to detect what type of window/s you have open.
$query($nick) will tell you if you have a private message open with $nick (or anyother parm you provide), and the same is said of $chat.
All
isquery and
isdcc should return is yes or no if a query exists (or dcc)
eg:
if ($me isquery) {
asdasdasd
}