I wrote a plugin that does this a few weeks ago so you don't need to write one, but since ur drop function is different you can probably learn whatever you need to from looking at my code.
Restrict Commands has 41 commands you can block using an in-game menu including the ones you want restricted. Just give credit for stuff you use from my plugin which you did not write or things which helped you learn how to do something. Happy fragging