]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - extensions/m_mkpasswd.c
Update TODO
[irc/rqf/shadowircd.git] / extensions / m_mkpasswd.c
index dd84b8f3d618856356bfa0be09083bfd40270331..16b76f1c24f894022136e37e3019ec33f3c186e5 100644 (file)
 #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 <string.h>
 
-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,
@@ -55,15 +53,15 @@ m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const cha
        static time_t last_used = 0;
        int is_md5 = 0;
 
-       if((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
+       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, parv[0], "MKPASSWD");
                return 0;
        }
        else
        {
-               last_used = CurrentTime;
+               last_used = rb_current_time();
        }
 
        if(parc == 3)
@@ -90,7 +88,7 @@ m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const cha
                sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "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()));
 
@@ -132,7 +130,7 @@ mo_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const ch
                sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "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;
 }