X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/2b2e97af7fdb9b456ab168f25a23208b428e4131..1773e9cbab14055da08eb3e35e7dd3a14d7587ac:/extensions/m_mkpasswd.c diff --git a/extensions/m_mkpasswd.c b/extensions/m_mkpasswd.c index 35a9c0c..bf5f038 100644 --- a/extensions/m_mkpasswd.c +++ b/extensions/m_mkpasswd.c @@ -14,11 +14,11 @@ #include "client.h" #include "common.h" /* FALSE bleah */ #include "ircd.h" -#include "irc_string.h" +#include "match.h" #include "numeric.h" #include "s_newconf.h" #include "s_conf.h" -#include "s_log.h" +#include "logger.h" #include "s_serv.h" #include "send.h" #include "msg.h" @@ -27,8 +27,6 @@ #include -extern char *crypt(); - static int m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static int mo_mkpasswd(struct Client *client_p, struct Client *source_p, @@ -58,7 +56,7 @@ m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const cha if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) { /* safe enough to give this on a local connect only */ - sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0]); + sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name, "MKPASSWD"); return 0; } else @@ -87,10 +85,10 @@ m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const cha } if(parc == 1) - sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "MKPASSWD"); + sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, source_p->name, "MKPASSWD"); else sendto_one_notice(source_p, ":Encryption for [%s]: %s", - parv[1], crypt(parv[1], + parv[1], rb_crypt(parv[1], is_md5 ? make_md5_salt() : make_salt())); @@ -99,7 +97,6 @@ m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const cha /* ** mo_test -** parv[0] = sender prefix ** parv[1] = parameter */ static int @@ -129,10 +126,10 @@ mo_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const ch } if(parc == 1) - sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "MKPASSWD"); + sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, source_p->name, "MKPASSWD"); else sendto_one_notice(source_p, ":Encryption for [%s]: %s", - parv[1], crypt(parv[1], is_md5 ? make_md5_salt() : make_salt())); + parv[1], rb_crypt(parv[1], is_md5 ? make_md5_salt() : make_salt())); return 0; }