Changeset 826 for branches/ithildin-1.1


Ignore:
Timestamp:
11/19/08 22:38:02 (4 years ago)
Author:
wd
Message:

Don't allow already-existant servers to be introduced. Duh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ithildin-1.1/modules/ircd/commands/server.c

    r772 r826  
    155155                return IRCD_CONNECTION_CLOSED; 
    156156            } 
     157        } 
     158 
     159        if (find_server(argv[1]) != NULL) 
     160        { 
     161            server_t *uplink = srv_server_uplink(srv); 
     162 
     163            /* Trying to introduce a server we already know about?  We'll 
     164             * just drop this link right away. 
     165             * XXX: Some ircds drop the link which is newest, not 
     166             * necessarily the link that didn't have the server before.  I'm 
     167             * not sure what the rationale is here, but it might be worth 
     168             * evaluating at a later date. */ 
     169            sendto_flag(SFLAG("GNOTICE"), 
     170                    "Server %s trying to introduce existing server %s%s%s", 
     171                    srv->name, argv[1], 
     172                    srv != uplink ? " via " : "", 
     173                    srv != uplink ? uplink->name : ""); 
     174            sendto_serv_butone(srv, NULL, ircd.me, NULL, "GNOTICE", 
     175                    "Server %s trying to introduce existing server %s%s%s", 
     176                    srv->name, argv[1], 
     177                    srv != uplink ? " via " : "", 
     178                    srv != uplink ? uplink->name : ""); 
     179            destroy_server(uplink, "trying to introduce existing server"); 
     180 
     181            return IRCD_CONNECTION_CLOSED; 
    157182        } 
    158183 
Note: See TracChangeset for help on using the changeset viewer.