]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/hostmask.c
Argh, wrong replace caused by MS VS 2005 interface.
[irc/rqf/shadowircd.git] / src / hostmask.c
index d45dc112e384e1ba6fdb2a00903262345593d40b..cbbb0e98a162920a284a0c9cc78837ca82ef5b9b 100644 (file)
@@ -5,7 +5,7 @@
  *  Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
  *  Copyright (C) 1996-2002 Hybrid Development Team
  *  Copyright (C) 2002-2005 ircd-ratbox development team
- *  Copyright (C) 2005-2006 charybdis development team
+ *  Copyright (C) 2005-2008 charybdis development team
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -26,7 +26,6 @@
  */
 
 #include "stdinc.h"
-#include "memory.h"
 #include "ircd_defs.h"
 #include "s_conf.h"
 #include "hostmask.h"
@@ -432,8 +431,7 @@ find_dline(struct sockaddr *addr, int aftype)
        return find_conf_by_address(NULL, NULL, NULL, addr, CONF_DLINE | 1, aftype, NULL);
 }
 
-/* void find_exact_conf_by_address(const char*, int, const char *,
- *         struct ConfItem *aconf)
+/* void find_exact_conf_by_address(const char*, int, const char *)
  * Input: 
  * Output: ConfItem if found
  * Side-effects: None
@@ -471,7 +469,7 @@ find_exact_conf_by_address(const char *address, int type, const char *username)
        {
                if (arec->type == type &&
                                arec->masktype == masktype &&
-                               !irccmp(arec->username, username))
+                               (arec->username == NULL || username == NULL ? arec->username == username : !irccmp(arec->username, username)))
                {
                        if (masktype == HM_HOST)
                        {
@@ -580,7 +578,7 @@ delete_one_address_conf(const char *address, struct ConfItem *aconf)
                        aconf->status |= CONF_ILLEGAL;
                        if(!aconf->clients)
                                free_conf(aconf);
-                       MyFree(arec);
+                       rb_free(arec);
                        return;
                }
                arecl = arec;
@@ -620,7 +618,7 @@ clear_out_address_conf(void)
                                arec->aconf->status |= CONF_ILLEGAL;
                                if(!arec->aconf->clients)
                                        free_conf(arec->aconf);
-                               MyFree(arec);
+                               rb_free(arec);
                        }
                }
                *store_next = NULL;
@@ -653,7 +651,7 @@ clear_out_address_conf_bans(void)
                                arec->aconf->status |= CONF_ILLEGAL;
                                if(!arec->aconf->clients)
                                        free_conf(arec->aconf);
-                               MyFree(arec);
+                               rb_free(arec);
                        }
                }
                *store_next = NULL;
@@ -679,22 +677,20 @@ show_iline_prefix(struct Client *sptr, struct ConfItem *aconf, char *name)
        prefix_ptr = prefix_of_host;
        if(IsNoTilde(aconf))
                *prefix_ptr++ = '-';
-       if(IsLimitIp(aconf))
-               *prefix_ptr++ = '!';
        if(IsNeedIdentd(aconf))
                *prefix_ptr++ = '+';
-       if(IsPassIdentd(aconf))
-               *prefix_ptr++ = '$';
-       if(IsNoMatchIp(aconf))
-               *prefix_ptr++ = '%';
        if(IsConfDoSpoofIp(aconf))
                *prefix_ptr++ = '=';
-       if(MyOper(sptr) && IsConfExemptKline(aconf))
+       if(IsOper(sptr) && IsConfExemptFlood(aconf))
+               *prefix_ptr++ = '|';
+       if(IsOper(sptr) && IsConfExemptGline(aconf) && !IsConfExemptKline(aconf))
+               *prefix_ptr++ = '_';
+       if(IsOper(sptr) && IsConfExemptDNSBL(aconf) && !IsConfExemptKline(aconf))
+               *prefix_ptr++ = '$';
+       if(IsOper(sptr) && IsConfExemptKline(aconf))
                *prefix_ptr++ = '^';
-       if(MyOper(sptr) && IsConfExemptLimits(aconf))
+       if(IsOper(sptr) && IsConfExemptLimits(aconf))
                *prefix_ptr++ = '>';
-       if(MyOper(sptr) && IsConfIdlelined(aconf))
-               *prefix_ptr++ = '<';
        *prefix_ptr = '\0';
        strncpy(prefix_ptr, name, USERLEN);
        return (prefix_of_host);
@@ -720,7 +716,7 @@ report_auth(struct Client *client_p)
                        {
                                aconf = arec->aconf;
 
-                               if(!MyOper(client_p) && IsConfDoSpoofIp(aconf))
+                               if(!IsOper(client_p) && IsConfDoSpoofIp(aconf))
                                        continue;
 
                                get_printable_conf(aconf, &name, &host, &pass, &user, &port,