|
@@ -15,7 +15,7 @@
|
|
|
|
|
|
#pragma newdecls required
|
|
|
|
|
|
-#define PLUGIN_VERSION "1.0.3"
|
|
|
+#define PLUGIN_VERSION "1.0.4"
|
|
|
public Plugin myinfo = {
|
|
|
name = "[CSRD] Name Filter",
|
|
|
author = "nosoop",
|
|
@@ -83,12 +83,6 @@ void OnNameUpdated(int client) {
|
|
|
if (!bCharFiltered) {
|
|
|
// it's a character we're not filtering
|
|
|
StrCatMultiByteChar(newNameBuffer, sizeof(newNameBuffer), fullChar, nCharBytes);
|
|
|
- } else {
|
|
|
- // we filtered this one
|
|
|
- // we could be as rude as they are in using unprintables, but we're nice
|
|
|
-
|
|
|
- // TODO check if the last character in new buffer is a space to prevent multiples
|
|
|
- StrCat(newNameBuffer, sizeof(newNameBuffer), " ");
|
|
|
}
|
|
|
|
|
|
bNameChanged |= bCharFiltered;
|
|
@@ -100,6 +94,8 @@ void OnNameUpdated(int client) {
|
|
|
// Remove surrounding whitespace
|
|
|
TrimString(newNameBuffer);
|
|
|
|
|
|
+ // TODO remove duplicate whitespace
|
|
|
+
|
|
|
// If there's no printable characters in the buffer, the player is a total dongbus.
|
|
|
if (strlen(newNameBuffer) == 0) {
|
|
|
Format(newNameBuffer, sizeof(newNameBuffer), UNPRINTABLE_NAME_USER_FORMAT,
|