hashymodules &hashers;
std::deque<std::string> &names;
public:
- CommandMkpasswd (InspIRCd* Instance, Module* Creator, hashymodules &h, std::deque<std::string> &n)
- : Command(Instance, Creator, "MKPASSWD", 0, 2), hashers(h), names(n)
+ CommandMkpasswd(Module* Creator, hashymodules &h, std::deque<std::string> &n) : Command(Creator, "MKPASSWD", 2), hashers(h), names(n)
{
syntax = "<hashtype> <any-text>";
+ Penalty = 5;
}
void MakeHash(User* user, const char* algo, const char* stuff)
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
{
MakeHash(user, parameters[0].c_str(), parameters[1].c_str());
- // this hashing could take some time, increasing server load.
- // Slow down the user if they are trying to flood mkpasswd requests
- user->IncreasePenalty(5);
return CMD_SUCCESS;
}
bool diduseiface; /* If we've called UseInterface yet. */
public:
- ModuleOperHash(InspIRCd* Me)
- : Module(Me), cmd(Me, this, hashers, names)
+ ModuleOperHash()
+ : cmd(this, hashers, names)
{
diduseiface = false;
virtual Version GetVersion()
{
- return Version("$Id$",VF_VENDOR,API_VERSION);
+ return Version("Allows for hashed oper passwords",VF_VENDOR,API_VERSION);
}
};