for(unsigned int i=0; i < count; i++)
user->Write(line);
}
- else if (parameters[0] == "freeze")
+ else if (parameters[0] == "freeze" && IS_LOCAL(user))
{
- user->Penalty += 100;
+ IS_LOCAL(user)->Penalty += 100;
}
- else if (parameters[0] == "shutdown")
+ else if (parameters[0] == "shutdown" && IS_LOCAL(user))
{
int i = parameters.size() > 1 ? atoi(parameters[1].c_str()) : 2;
- ServerInstance->SE->Shutdown(user->GetFd(), i);
+ ServerInstance->SE->Shutdown(IS_LOCAL(user)->GetFd(), i);
}
return CMD_SUCCESS;
}
public:
ModuleTest() : cmd(this)
{
- if (!strstr(ServerInstance->Config->ServerName, ".test"))
+ if (!strstr(ServerInstance->Config->ServerName.c_str(), ".test"))
throw ModuleException("Don't load modules without reading their descriptions!");
ServerInstance->AddCommand(&cmd);
}