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 f08ef5f..9b53a1d 100644 (file)
@@ -2856,9 +2856,16 @@ float isInvisibleString(string s)
                switch(c)
                {
                        case 0:
-                       case 32:
-                       case 160:
+                       case 32: // space
                                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;
                }