List[I_OnPreCommand] = List[I_On005Numeric] = 1;
}
- virtual int OnPreCommand(const std::string &command, char **parameters, int pcnt, userrec *user, bool validated)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated)
{
/* If the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
return 0;
- if (*user->oper)
+ if ((*user->oper) && (IS_LOCAL(user)) && (user->HasPermission(command)))
{
std::string plist = "";
for (int j = 0; j < pcnt; j++)