You just gotta log it all and message the channel on the event.
on *:text:*:#: write $nick $+ .log.txt $1-
on *:text:*subscribe*:#: {
if ($nick != twitchnotify ) halt
msg # $1 has just subscribed. $1 has written $lines($1 $+ .log.txt) messages in this channel.
}
Think about how you want to do something and it's very logical, it's not hard to come up with yourself.