Yeah this is awesome i mean it only announces in the active channel your in and also you have the decision to do a msg or a amsg and thats just sooooooooo cool i ain\'t never seen one look this BAD before.
First off you need to change $active to amsg (%msg == amsg) amsg
And also you might want to work on your repeat some and actually clean it up a bit cause it looks HORRIBLE.