Changeset 841 for branches


Ignore:
Timestamp:
05/11/09 05:12:03 (3 years ago)
Author:
wd
Message:

Don't let NPC names overlap with real users.

File:
1 edited

Legend:

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

    r840 r841  
    8080 
    8181    /* copy as much of the nick as possible, reserve space for underscoring */ 
    82     if (strlen(argv[2]) > NICKLEN - 2) { 
     82    if (find_client(argv[2]) != NULL) { 
     83        /* XXX: Don't hardcode this. */ 
     84        sendto_one(cli, RPL_FMT(cli, 433), argv[1]); 
     85        return COMMAND_WEIGHT_LOW; 
     86    } else if (strlen(argv[2]) > NICKLEN - 2) { 
    8387        sendto_one(cli, "NOTICE", ":NPC nickname %s is too long (maximum is %d letters)", 
    8488                   argv[2], NICKLEN - 2); 
Note: See TracChangeset for help on using the changeset viewer.