replace textfilter functions with one-fits-all version

* replaces filtertext() with a version with a dozen of single filters
  that can be used in any combination
* defines classes of allowed characters for strings for various uses
  (see protocol.h line 153ff)
* now the allowed charset of, for example, player names is defined
  in one location only
* fixes issue #58
This commit is contained in:
ac-stef
2014-05-24 12:59:19 +02:00
parent e313a99beb
commit a0286d2b3f
13 changed files with 157 additions and 144 deletions
+2 -2
View File
@@ -97,7 +97,7 @@ void renderconsole() { con.render(); }
void clientlogf(const char *s, ...)
{
defvformatstring(sp, s, s);
filtertext(sp, sp, 2);
filtertext(sp, sp, FTXT__LOG);
extern struct servercommandline scl;
const char *ts = scl.logtimestamp ? timestring(true, "%b %d %H:%M:%S ") : "";
char *p, *l = sp;
@@ -345,7 +345,7 @@ void mapmsg(char *s)
{
string text;
filterrichtext(text, s);
filterservdesc(text, text);
filtertext(text, text, FTXT__MAPMSG);
copystring(hdr.maptitle, text, 128);
if(editmode) unsavededits++;
}