Did you leave my alias by itself or try to incorporate its content into your script? Note there are different uses of %nick and $nick