Use $chat to check if you have a DCC chat open with somebody. Example:
Code:
if ($chat(Tye)) { echo -a I have a DCC Chat window with Tye } 




Tye on Undernet and DALnet