fix: keep path and uppercase in demo filenames

votes now distinguish between demo and map votecalls and filter the
filename appropriately

also: remove paths from map names cleanly
This commit is contained in:
ac-stef
2014-05-25 00:35:22 +02:00
parent b246e6e153
commit 29dd50bde6
6 changed files with 17 additions and 11 deletions
+2 -2
View File
@@ -169,7 +169,7 @@ char *filtertext(char *dst, const char *src, int flags, int len)
if(filename)
{
const char *org = "*?![]{};:/\\",
*asc = "__o()()____", // 'o' -> ignore
*asc = "__o()()__oo", // 'o' -> ignore
*a = strchr(org, c);
if(a)
{
@@ -196,7 +196,7 @@ char *filtertext(char *dst, const char *src, int flags, int len)
}
pass = true;
}
if(mapname && !islower(c) && !isdigit(c) && !strchr("_-.", c)) continue;
if(mapname && !isalnum(c) && !strchr("_-./\\", c)) continue;
if(isspace(c))
{
if(nowhite && !((c == ' ' && allowblanks) || (c == '\n' && allownl)) && !pass) continue;