How to make a minecraft command that is activated by saying a certain thing?

I can't be specific, but what I mean is, well i have a 1.8 temple run (1) map being made, I use a simple command and a redstone clock to make it force you out of creative mode and stay in adventure. How do you make a command where if you type "/gamemode 1" it says something like "trying to go in creative mode, are we?" Help

Please leave a copy/paste command in the comment XD