/* Handle /MKPASSWD
*/
-class cmd_mkpasswd : public Command
+class CommandMkpasswd : public Command
{
Module* Sender;
hashymodules &hashers;
std::deque<std::string> &names;
public:
- cmd_mkpasswd (InspIRCd* Instance, Module* S, hashymodules &h, std::deque<std::string> &n)
+ CommandMkpasswd (InspIRCd* Instance, Module* S, hashymodules &h, std::deque<std::string> &n)
: Command(Instance,"MKPASSWD", 'o', 2), Sender(S), hashers(h), names(n)
{
this->source = "m_oper_hash.so";
syntax = "<hashtype> <any-text>";
}
- void MakeHash(userrec* user, const char* algo, const char* stuff)
+ void MakeHash(User* user, const char* algo, const char* stuff)
{
/* Lets see if they gave us an algorithm which has been implemented */
hashymodules::iterator x = hashers.find(algo);
}
}
- CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, User *user)
{
MakeHash(user, parameters[0], parameters[1]);
/* NOTE: Don't propagate this across the network!
class ModuleOperHash : public Module
{
- cmd_mkpasswd* mycommand;
+ CommandMkpasswd* mycommand;
ConfigReader* Conf;
hashymodules hashers; /* List of modules which implement HashRequest */
std::deque<std::string> names; /* Module names which implement HashRequest */
throw ModuleException("I can't find any modules loaded which implement the HashRequest interface! You probably forgot to load a hashing module such as m_md5.so or m_sha256.so.");
}
- mycommand = new cmd_mkpasswd(ServerInstance, this, hashers, names);
+ mycommand = new CommandMkpasswd(ServerInstance, this, hashers, names);
ServerInstance->AddCommand(mycommand);
}
List[I_OnRehash] = List[I_OnOperCompare] = 1;
}
- virtual void OnRehash(userrec* user, const std::string ¶meter)
+ virtual void OnRehash(User* user, const std::string ¶meter)
{
/* Re-read configuration file */
if (Conf)