I just took out the lower() for both...

if (lower(spell) == lower(match(self.macrospell, "^[^(]+"))) then

became:

if (spell == match(self.macrospell, "^[^(]+")) then



I don't know which is better. If I run into errors, I'll let you know