forked from kyonshi/grenzland-mud
[Apr 14 2007] - Rumble
IP's only visible to LVL_GOD and above now for the paranoid people out there. [Apr 13 2007] - Rumble Finally made gemote actually work like emote and not just use socials. (thanks Fizban) Reworded and standardized the trigedit attachment menu. Numerous minor fixes taken from the latest CWG release. (thanks Zizazat) Update to is_number to check for negative numbers. (thanks Kyle) Update to isname to disallow abbreviated numbers. (thanks Sryth) [Apr 08 2007] - Rumble Removed all usage of CAP(str causing a memory leak (thanks Kyle).
This commit is contained in:
@@ -96,17 +96,18 @@ int isname(const char *str, const char *namelist)
|
||||
|
||||
newlist = strdup(namelist); /* make a copy since strtok 'modifies' strings */
|
||||
for(curtok = strtok(newlist, WHITESPACE); curtok; curtok = strtok(NULL, WHITESPACE))
|
||||
if(curtok && is_abbrev(str, curtok))
|
||||
{
|
||||
free(newlist);
|
||||
return 1;
|
||||
}
|
||||
free(newlist);
|
||||
return 0;
|
||||
if(curtok && is_abbrev(str, curtok)) {
|
||||
/* Don't allow abbreviated numbers. - Sryth */
|
||||
if (isdigit(*str) && (atoi(str) != atoi(curtok)))
|
||||
return 0;
|
||||
free(newlist);
|
||||
return 1;
|
||||
}
|
||||
free(newlist);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void affect_modify(struct char_data *ch, byte loc, sbyte mod,
|
||||
bitvector_t bitv, bool add)
|
||||
void affect_modify(struct char_data *ch, byte loc, sbyte mod, bitvector_t bitv, bool add)
|
||||
{
|
||||
if (add)
|
||||
SET_BIT(AFF_FLAGS(ch), bitv);
|
||||
|
||||
Reference in New Issue
Block a user