I wasn't able to test the code the first time, but this time I was. The problem is the usage of the ? in the command line

Code:
on *:text:!announce &*:*:{ .amsg $2- }  


That will work, but you have to use the ! rather than the ?

I think the reason for this is because the ? acts as a single character wildcard in the match text events.