Messaging /clear to a channel doesn't clear the chatspace. Only the command /clear does that, and only for you not for someone else.
Beside that, this script won't work anyway since the brackets are missplaced. Please test your script before posting them.