Skip to content

fix: support digits in clan chat names + optional default clan chat for new players#1027

Merged
GregHib merged 1 commit into
GregHib:mainfrom
HarleyGilpin:feat/clan-chat-enhancements
Jun 12, 2026
Merged

fix: support digits in clan chat names + optional default clan chat for new players#1027
GregHib merged 1 commit into
GregHib:mainfrom
HarleyGilpin:feat/clan-chat-enhancements

Conversation

@HarleyGilpin

Copy link
Copy Markdown
Contributor

Fixes

Clan names containing digits were broken: writeLong(String) in JagExtensions.kt encoded names as base-37 RS longs but checked digit characters against in 0..9 instead of their ASCII codes (48..57), so digits were silently dropped.

  • Mixed names (e.g. Clan123) displayed without their digits.
  • All-numeric names (e.g. 123) encoded to 0, making the channel impossible to join.

One-line fix to the character range; the - 21 offset was already correct ('0' → 27 … '9' → 36).

Features

Added an optional world.start.clanChat setting (game.properties). When set to a channel owner's display name, brand-new accounts automatically join that clan chat on first login. Detection uses the transient new_player flag set by
AccountManager.create(), so it is unaffected by script ordering or the world.start.creation setting. Bots are excluded, and the join persists via the existing clan_chat variable (normal auto-rejoin/leave behaviour applies).

Tests

  • JagExtensionsTest: digit encoding cases (clan123, all-numeric 123).
  • ClanTest: new players auto-join the default channel; existing players don't.
  • WorldTest.createPlayer gained an optional pre-spawn setup lambda for variable injection.

@GregHib GregHib merged commit 55d1b67 into GregHib:main Jun 12, 2026
2 checks passed
@HarleyGilpin HarleyGilpin deleted the feat/clan-chat-enhancements branch June 12, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants