]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_xline.c
Much clear maxconnections stuff - ported from ratbox3.
[irc/rqf/shadowircd.git] / modules / m_xline.c
index 356635347008b86bd52da9cea9ab0653979b475c..fb615ad0b55ef6fc67e69dec7599b326a4c5fa20 100644 (file)
@@ -31,7 +31,6 @@
  */
 
 #include "stdinc.h"
-#include "tools.h"
 #include "send.h"
 #include "channel.h"
 #include "client.h"
@@ -40,8 +39,7 @@
 #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"
@@ -313,17 +311,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 +345,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();
 }
 
@@ -373,9 +371,9 @@ write_xline(struct Client *source_p, struct ConfItem *aconf)
                return;
        }
 
-       ircsprintf(buffer, "\"%s\",\"0\",\"%s\",\"%s\",%ld\n",
+       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)
        {
@@ -561,7 +559,7 @@ remove_xline(struct Client *source_p, const char *name)
                        
                        remove_reject_mask(aconf->name, NULL);
                        free_conf(aconf);
-                       dlinkDestroy(ptr, &xline_conf_list);
+                       rb_dlinkDestroy(ptr, &xline_conf_list);
                        return;
                }
        }
@@ -593,7 +591,7 @@ remove_xline_from_file(struct Client *source_p, const char *huntgecos)
        int found_xline = 0;
 
        filename = ConfigFileEntry.xlinefile;
-       ircsnprintf(temppath, sizeof(temppath),
+       rb_snprintf(temppath, sizeof(temppath),
                 "%s.tmp", ConfigFileEntry.xlinefile);
 
        if((in = fopen(filename, "r")) == NULL)