]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_gline.c
s_log.* -> logger.* (s_foo looks ugly, lets try to get rid of it)
[irc/rqf/shadowircd.git] / modules / m_gline.c
index e3c90c4cede76ca2df7e842dc61623633d244308..322e2d84da605d404096bae23b5c5e7876ba22e1 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 #include "stdinc.h"
-#include "tools.h"
 #include "s_gline.h"
 #include "channel.h"
 #include "client.h"
@@ -36,7 +35,6 @@
 #include "ircd.h"
 #include "hostmask.h"
 #include "numeric.h"
-#include "commio.h"
 #include "s_conf.h"
 #include "s_newconf.h"
 #include "scache.h"
@@ -46,7 +44,7 @@
 #include "hash.h"
 #include "parse.h"
 #include "modules.h"
-#include "s_log.h"
+#include "logger.h"
 #include "reject.h"
 
 static int mo_gline(struct Client *, struct Client *, int, const char **);
@@ -556,15 +554,15 @@ set_local_gline(struct Client *source_p, const char *user,
                oper_reason++;
 
                if(!EmptyString(oper_reason))
-                       DupString(aconf->spasswd, oper_reason);
+                       aconf->spasswd = rb_strdup(oper_reason);
        }
 
-       ircsnprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);
+       rb_snprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);
 
-       DupString(aconf->passwd, buffer);
-       DupString(aconf->user, user);
-       DupString(aconf->host, host);
-       aconf->hold = CurrentTime + ConfigFileEntry.gline_time;
+       aconf->passwd = rb_strdup(buffer);
+       aconf->user = rb_strdup(user);
+       aconf->host = rb_strdup(host);
+       aconf->hold = rb_current_time() + ConfigFileEntry.gline_time;
        add_gline(aconf);
 
        sendto_realops_snomask(SNO_GENERAL, L_ALL,
@@ -651,10 +649,10 @@ majority_gline(struct Client *source_p, const char *user,
                                        sizeof(pending->oper_user2));
                                strlcpy(pending->oper_host2, source_p->host,
                                        sizeof(pending->oper_host2));
-                               DupString(pending->reason2, reason);
+                               pending->reason2 = rb_strdup(reason);
                                pending->oper_server2 = scache_get_name(source_p->servptr->serv->nameinfo);
-                               pending->last_gline_time = CurrentTime;
-                               pending->time_request2 = CurrentTime;
+                               pending->last_gline_time = rb_current_time();
+                               pending->time_request2 = rb_current_time();
                                return NO;
                        }
                }
@@ -662,7 +660,7 @@ majority_gline(struct Client *source_p, const char *user,
 
        /* no pending gline, create a new one */
        pending = (struct gline_pending *) 
-                           MyMalloc(sizeof(struct gline_pending));
+                           rb_malloc(sizeof(struct gline_pending));
 
        strlcpy(pending->oper_nick1, source_p->name,
                sizeof(pending->oper_nick1));
@@ -675,13 +673,13 @@ majority_gline(struct Client *source_p, const char *user,
 
        strlcpy(pending->user, user, sizeof(pending->user));
        strlcpy(pending->host, host, sizeof(pending->host));
-       DupString(pending->reason1, reason);
+       pending->reason1 = rb_strdup(reason);
        pending->reason2 = NULL;
 
-       pending->last_gline_time = CurrentTime;
-       pending->time_request1 = CurrentTime;
+       pending->last_gline_time = rb_current_time();
+       pending->time_request1 = rb_current_time();
 
-       dlinkAddAlloc(pending, &pending_glines);
+       rb_dlinkAddAlloc(pending, &pending_glines);
 
        return NO;
 }
@@ -697,7 +695,7 @@ remove_temp_gline(const char *user, const char *host)
 {
        struct ConfItem *aconf;
        rb_dlink_node *ptr;
-       struct irc_sockaddr_storage addr, caddr;
+       struct rb_sockaddr_storage addr, caddr;
        int bits, cbits;
        int mtype, gtype;
 
@@ -722,7 +720,7 @@ remove_temp_gline(const char *user, const char *host)
                                                (struct sockaddr *)&caddr, bits))
                        continue;
 
-               dlinkDestroy(ptr, &glines);
+               rb_dlinkDestroy(ptr, &glines);
                remove_reject_mask(aconf->user, aconf->host);
                delete_one_address_conf(aconf->host, aconf);
                return YES;