Is $scid($chat(nick).cid).network what you're after? You may have to add some sanity checking for chats that don't (or no longer) belong to a specific server.

Hope that helps smile