Ignoring all incoming texts exempt the 3 command texts

I am using a Leonardo with an itead 3G GSM shield. Basically if you send it a text command of "on" or "off" it will open or close shades. The problem is if you text it anything else, it will delay all future commands dramatically, (maybe an hour or never). Is there a line I can put in the script to ignore all commands other than "on" or "off"?

Are the commands ("on", "off") Strings or strings?

groundFungus:
Are the commands ("on", "off") Strings or strings?

(Note: The script was written for me), it says:
case COMMAND_OFF:
messageString = "Confirmed OFF";

(Under the GSM tab it says):
if(gsmSerialBufferString.indexOf("off") > -1){
return (COMMAND_OFF);

(Under the setup.h tab):
typedef enum {
COMMAND_NONE = 0,
COMMAND_ON,
COMMAND_OFF,
COMMAND_SIGNAL
} GSM_COMMAND;

Does that answer if Strings or strings was used?

So, you want to ignore the COMMAND_NONE and COMMAND_SIGNAL commands?

case COMMAND_OFF:
                messageString = "Confirmed OFF";

This is part of a switch block. There may (should) be cases for the commands that you wish to ignore. Comment out or remove those cases.

I am kind of guessing here as all you posted is snippets. If that is not what you want, please explain.

Please read the "How to use the forum-please read" stickies to see how to format and post your code.

That worked, thanks!