]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_etrace.c
strlcat -> rb_strlcat
[irc/rqf/shadowircd.git] / modules / m_etrace.c
index d456845b89dfc74ddda1199e5b5104002c150c65..9e2998dabf7051965402b328c348e61c787a8704 100644 (file)
@@ -42,7 +42,6 @@
 #include "irc_string.h"
 #include "ircd.h"
 #include "numeric.h"
-#include "commio.h"
 #include "s_serv.h"
 #include "s_conf.h"
 #include "s_newconf.h"
@@ -92,7 +91,7 @@ mo_etrace(struct Client *client_p, struct Client *source_p, int parc, const char
        {
                if(!irccmp(parv[1], "-full"))
                        do_etrace_full(source_p);
-#ifdef IPV6
+#ifdef RB_IPV6
                else if(!irccmp(parv[1], "-v6"))
                        do_etrace(source_p, 0, 1);
                else if(!irccmp(parv[1], "-v4"))
@@ -107,7 +106,7 @@ mo_etrace(struct Client *client_p, struct Client *source_p, int parc, const char
                                if(!MyClient(target_p))
                                        sendto_one(target_p, ":%s ENCAP %s ETRACE %s",
                                                get_id(source_p, target_p),
-                                               target_p->user->server,
+                                               target_p->servptr->name,
                                                get_id(target_p, target_p));
                                else
                                        do_single_etrace(source_p, target_p);
@@ -145,14 +144,14 @@ static void
 do_etrace(struct Client *source_p, int ipv4, int ipv6)
 {
        struct Client *target_p;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
 
        /* report all direct connections */
-       DLINK_FOREACH(ptr, lclient_list.head)
+       RB_DLINK_FOREACH(ptr, lclient_list.head)
        {
                target_p = ptr->data;
 
-#ifdef IPV6
+#ifdef RB_IPV6
                if((!ipv4 && target_p->localClient->ip.ss_family == AF_INET) ||
                   (!ipv6 && target_p->localClient->ip.ss_family == AF_INET6))
                        continue;
@@ -173,9 +172,9 @@ do_etrace(struct Client *source_p, int ipv4, int ipv6)
 static void
 do_etrace_full(struct Client *source_p)
 {
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
 
-       DLINK_FOREACH(ptr, lclient_list.head)
+       RB_DLINK_FOREACH(ptr, lclient_list.head)
        {
                do_single_etrace(source_p, ptr->data);
        }
@@ -221,7 +220,7 @@ mo_chantrace(struct Client *client_p, struct Client *source_p, int parc, const c
        struct membership *msptr;
        const char *sockhost;
        const char *name;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        int operspy = 0;
 
        name = parv[1];
@@ -257,7 +256,7 @@ mo_chantrace(struct Client *client_p, struct Client *source_p, int parc, const c
                return 0;
        }
 
-       DLINK_FOREACH(ptr, chptr->members.head)
+       RB_DLINK_FOREACH(ptr, chptr->members.head)
        {
                msptr = ptr->data;
                target_p = msptr->client_p;
@@ -283,12 +282,12 @@ mo_chantrace(struct Client *client_p, struct Client *source_p, int parc, const c
 }
 
 static void
-match_masktrace(struct Client *source_p, dlink_list *list,
+match_masktrace(struct Client *source_p, rb_dlink_list *list,
        const char *username, const char *hostname, const char *name,
        const char *gecos)
 {
        struct Client *target_p;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        const char *sockhost;   
        char *mangle_gecos = NULL;
        
@@ -329,7 +328,7 @@ match_masktrace(struct Client *source_p, dlink_list *list,
                        mangle_gecos = LOCAL_COPY(gecos);
        }
 
-       DLINK_FOREACH(ptr, list->head)
+       RB_DLINK_FOREACH(ptr, list->head)
        {
                target_p = ptr->data;
                if(!IsPerson(target_p))
@@ -416,10 +415,10 @@ mo_masktrace(struct Client *client_p, struct Client *source_p, int parc,
                if (!ConfigFileEntry.operspy_dont_care_user_info)
                {
                        char buf[512];
-                       strlcpy(buf, mask, sizeof(buf));
+                       rb_strlcpy(buf, mask, sizeof(buf));
                        if(!EmptyString(gecos)) {
-                               strlcat(buf, " ", sizeof(buf));
-                               strlcat(buf, gecos, sizeof(buf));
+                               rb_strlcat(buf, " ", sizeof(buf));
+                               rb_strlcat(buf, gecos, sizeof(buf));
                        }               
 
                        report_operspy(source_p, "MASKTRACE", buf);