I don't think it would make a lot of sense to have a script like that. At least for the use you told me.
The script you are requesting here would notify a specific servergroup or client whenever a client leaves a specified channel. That means that you would have to be online all the time to get each notification. Wouldn't it be more handy if the script counts how many times a channel was left per day and gives you the results at the end of the day?