mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 15:38:00 +02:00
Merge pull request #10172 from howard-stearns/fix-multi-line-session-display-name
fix multi-line sessionDisplayName
This commit is contained in:
commit
333f950512
1 changed files with 1 additions and 1 deletions
|
@ -200,7 +200,7 @@ void AvatarMixer::manageDisplayName(const SharedNodePointer& node) {
|
||||||
QString baseName = avatar.getDisplayName().trimmed();
|
QString baseName = avatar.getDisplayName().trimmed();
|
||||||
const QRegularExpression curses { "fuck|shit|damn|cock|cunt" }; // POC. We may eventually want something much more elaborate (subscription?).
|
const QRegularExpression curses { "fuck|shit|damn|cock|cunt" }; // POC. We may eventually want something much more elaborate (subscription?).
|
||||||
baseName = baseName.replace(curses, "*"); // Replace rather than remove, so that people have a clue that the person's a jerk.
|
baseName = baseName.replace(curses, "*"); // Replace rather than remove, so that people have a clue that the person's a jerk.
|
||||||
const QRegularExpression trailingDigits { "\\s*_\\d+$" }; // whitespace "_123"
|
const QRegularExpression trailingDigits { "\\s*(_\\d+\\s*)?(\\s*\\n[^$]*)?$" }; // trailing whitespace "_123" and any subsequent lines
|
||||||
baseName = baseName.remove(trailingDigits);
|
baseName = baseName.remove(trailingDigits);
|
||||||
if (baseName.isEmpty()) {
|
if (baseName.isEmpty()) {
|
||||||
baseName = "anonymous";
|
baseName = "anonymous";
|
||||||
|
|
Loading…
Reference in a new issue