Fixes for killsent flag

This commit is contained in:
Michiel Broek
2001-11-16 20:07:42 +00:00
parent 5f06e6e421
commit a1d9bd4216
4 changed files with 17 additions and 16 deletions

View File

@@ -124,19 +124,20 @@ char *strip_flags(char *flags)
int flag_on(char *flag, char *flags)
{
char *p,*tok;
int up=0;
char *p, *tok;
int up = FALSE;
Syslog('m', "checking flag \"%s\" in string \"%s\"",MBSE_SS(flag),MBSE_SS(flags));
if (flags == NULL)
return 0;
p=xstrcpy(flags);
if (flags == NULL)
return FALSE;
Syslog('m', "checking flag \"%s\" in string \"%s\"", MBSE_SS(flag), MBSE_SS(flags));
p = xstrcpy(flags);
for (tok = strtok(p, ", \t\n"); tok; tok = strtok(NULL, ", \t\n")) {
if (strcasecmp(flag, tok) == 0)
up = 1;
up = TRUE;
}
free(p);
Syslog('m', "flag%s present",up?"":" not");
Syslog('m', "flag%s present", up ? "":" not");
return up;
}