what specific exploit are your trying to fix?
How about just making it so you can't spawn bots while you have aggro?
Code:
if(!strcasecmp(sep->arg[1], "spawn") ) {
if(c->GetAggroCount() > 0) {
c->Message(0, "You can't spawn bots while you have aggro.");
return;
}