]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Enhance isInvisibleString (used to detect invisible nicks) to recognize more invisibl...
authorterencehill <piuntn@gmail.com>
Sun, 5 Sep 2010 09:19:00 +0000 (11:19 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 5 Sep 2010 09:19:00 +0000 (11:19 +0200)
qcsrc/server/cl_client.qc

index f08ef5f5385b7b9dad3eb90bd06a86efbbff21db..9b53a1d955fed3949edbc2c1392bebf4aaf74485 100644 (file)
@@ -2856,9 +2856,16 @@ float isInvisibleString(string s)
                switch(c)
                {
                        case 0:
                switch(c)
                {
                        case 0:
-                       case 32:
-                       case 160:
+                       case 32: // space
                                break;
                                break;
+                       case 192: // charmap space
+                               if (!cvar("utf8_enable"))
+                                       break;
+                               return FALSE;
+                       case 160: // space in unicode fonts
+                       case 0xE000 + 192: // utf8 charmap space
+                               if (cvar("utf8_enable"))
+                                       break;
                        default:
                                return FALSE;
                }
                        default:
                                return FALSE;
                }