Re: [NEWBIE]Invalid names

From: Peter Ajamian (pajamian@cheapsam.com)
Date: 11/09/99


Emil Nilimaa wrote:

> how do i change it to be such that it only make those names
> which only contains that particular string, and nothing else to
> think this is the code for it in ban.c
>
> /* Does the desired name contain a string in the invalid list? */
>   for (i = 0; i < num_invalid; i++)
>     if (strstr(tempname, invalid_list[i]))
>       return (0);

replace this line...

 if (strstr(tempname, invalid_list[i]))

with this...

if (!strcmp(tmpname, invalid_list[i]))

A note of warning...

There is a reason that it is setup to match any substring of a name, players
have a tendancy to skirt the issue of using deragotory names by making that
name a substring of the entire name, hence when your game goes public and
eventually becomes popular you will see players with names such as
ImAMotherF_____ (fill in the blank yourself) note that players are very
creative and it is virutually impossible to put in a check for every
possible combination except by testing for substrings.  By changing this to
a test which only fails if the entire name matches you are setting yourself
up for a lot of trouble in the future.

Regards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST