the steps your script would have to take are as follow:

1: retrieve your ID from https://api.twitch.tv/kraken/channels/yourchannel

2:check http://tmi.twitch.tv/hosts?include_logins=1&target=yourID every minute or so to see who hosts you

3:strip the hosting usernames

4: if there is no cache, then cache the names. Else match the cache with the newly collected usernames

5:if new names, echo to chat

something like that, maybe.