mIRC handles stripping variables just fine. You can verify it with this:
//var %t = 12testing | echo -a $strip(%t)
You will need to display your variables/$1- to see what's wrong. Echo all variables/$1- right before the IF statement. Then, since you're comparing two items in your IF, make sure they are exactly the same (with exception to control codes). You have something that you think is equal, but is not. You'll have to debug it to find out what. Without the exact values for your variables and $1-, we can't do anything other than tell you that you have to debug your code.