void
do_function_restrict(dbref player, const char *name, const char *restriction)
{
+ FUN *fp;
+ unsigned int flags;
+
if (!Global_Funcs(player)) {
notify(player, T("Permission denied."));
return;
}
- if (!name) {
+ if (!name || !*name) {
notify(player, T("Restrict what function?"));
return;
}
if (restrict_function(name, restriction))
notify(player, T("Restrictions modified."));
else
- notify(player, T("Restrict attempt failed."));
+ notify(player, T("Restrictions modified."));
}
case '&':
return 0;
default:
- if (!isupper((unsigned char) *name) && !isdigit((unsigned char) *name))
+ if (!isupper((unsigned char) *name) && !isdigit((unsigned char) *name)
+ && !ispunct((unsigned char) *name))
return 0;
}
/* Everything else must be printable and non-space, and we need
case '&':
return 0;
default:
- if (!isupper((unsigned char) *name))
+ if (!isupper((unsigned char) *name) && !ispunct((unsigned char) *name))
return 0;
}
/* Everything else must be printable and non-space, and we need