]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_xline.c
Log unknown class in auth errors to ircd.log as well.
[irc/rqf/shadowircd.git] / modules / m_xline.c
index 9b257ff2368d13859af77badb12714f598fca939..e1c5c9f5c362195f72b2e12d5c26dda99d3f15c2 100644 (file)
@@ -31,7 +31,6 @@
  */
 
 #include "stdinc.h"
-#include "tools.h"
 #include "send.h"
 #include "channel.h"
 #include "client.h"
 #include "class.h"
 #include "ircd.h"
 #include "numeric.h"
-#include "memory.h"
-#include "s_log.h"
+#include "logger.h"
 #include "s_serv.h"
 #include "whowas.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
 #include "hash.h"
 #include "msg.h"
 #include "parse.h"
@@ -179,8 +176,8 @@ mo_xline(struct Client *client_p, struct Client *source_p, int parc, const char
 static int
 ms_xline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
-       /* parv[0]  parv[1]      parv[2]  parv[3]  parv[4]
-        * oper     target serv  xline    type     reason
+       /* source_p  parv[1]      parv[2]  parv[3]  parv[4]
+        * oper      target serv  xline    type     reason
         */
        propagate_xline(source_p, parv[1], 0, parv[2], parv[3], parv[4]);
 
@@ -313,17 +310,17 @@ apply_xline(struct Client *source_p, const char *name, const char *reason,
                }
 
                *new = '\0';
-               DupString(aconf->name, tmp);
+               aconf->name = rb_strdup(tmp);
        }
        else
-               DupString(aconf->name, name);
+               aconf->name = rb_strdup(name);
 
-       DupString(aconf->passwd, reason);
+       aconf->passwd = rb_strdup(reason);
        collapse(aconf->name);
 
        if(temp_time > 0)
        {
-               aconf->hold = CurrentTime + temp_time;
+               aconf->hold = rb_current_time() + temp_time;
 
                sendto_realops_snomask(SNO_GENERAL, L_ALL,
                             "%s added temporary %d min. X-Line for [%s] [%s]",
@@ -347,7 +344,7 @@ apply_xline(struct Client *source_p, const char *name, const char *reason,
                        get_oper_name(source_p), name, reason);
        }
 
-       dlinkAddAlloc(aconf, &xline_conf_list);
+       rb_dlinkAddAlloc(aconf, &xline_conf_list);
        check_xlines();
 }
 
@@ -375,7 +372,7 @@ write_xline(struct Client *source_p, struct ConfItem *aconf)
 
        rb_sprintf(buffer, "\"%s\",\"0\",\"%s\",\"%s\",%ld\n",
                   aconf->name, aconf->passwd,
-                  get_oper_name(source_p), CurrentTime);
+                  get_oper_name(source_p), (long) rb_current_time());
 
        if(fputs(buffer, out) == -1)
        {
@@ -491,8 +488,8 @@ mo_unxline(struct Client *client_p, struct Client *source_p, int parc, const cha
 static int
 ms_unxline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
-       /* parv[0]  parv[1]        parv[2]
-        * oper     target server  gecos
+       /* source_p  parv[1]        parv[2]
+        * oper      target server  gecos
         */
        propagate_generic(source_p, "UNXLINE", parv[1], CAP_CLUSTER,
                        "%s", parv[2]);
@@ -624,7 +621,7 @@ remove_xline_from_file(struct Client *source_p, const char *huntgecos)
                        break;
                }
 
-               strlcpy(buff, buf, sizeof(buff));
+               rb_strlcpy(buff, buf, sizeof(buff));
 
                if((p = strchr(buff, '\n')) != NULL)
                        *p = '\0';