mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
feat(filter): the chat filters cover animals' and pets' names
- server: a typed name the filter (lib/chat-filter.txt) stops is refused at xrn, with the game's warning and a line in the log; one saved before is cleared at login (the animal takes the username, the pet is "Pet"). the game's own word-id names are never looked at. - client: LocalizationManager.translateAvatarName and translatePetName pass a typed name through the player's own filter (AJClient.filterName), wherever the game shows it. a name cannot be left out, so with "Hide the whole message" its words are starred. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
34db374527
commit
43ae95fbca
4 files changed
+1030
-3
No files matched your search
+9
-2
@@ -2231,7 +2231,7 @@ package
|
||||
// what the player is to see of something another player wrote: the
|
||||
// text as it was, the text with stars over the filtered words, or
|
||||
// null when it is to be left out altogether.
|
||||
public static function filterText(param1:String) : String
|
||||
public static function filterText(param1:String, param2:Boolean = false) : String
|
||||
{
|
||||
var _loc2_:Array = _filterOwnEntries;
|
||||
var _loc3_:Array = [];
|
||||
@@ -2301,7 +2301,14 @@ package
|
||||
{
|
||||
return param1;
|
||||
}
|
||||
return filterMode == 1 ? null : _loc12_.join("");
|
||||
return filterMode == 1 && !param2 ? null : _loc12_.join("");
|
||||
}
|
||||
|
||||
// an animal's or a pet's typed name: a name cannot be left out, so its
|
||||
// filtered words are starred whichever the player chose.
|
||||
public static function filterName(param1:String) : String
|
||||
{
|
||||
return filterText(param1,true);
|
||||
}
|
||||
|
||||
// the same for text that has a place of its own (a Jam-A-Gram, a wall
|
||||
|
||||
Reference in new issue
Block a user