Quitting from the shutdown hook (SIGTERM) leaves every server, whose
disconnects then reach the mic hand-over and the notifier after their
threads have stopped. Both now drop work that comes in that late.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Our own leave also fires the socket's disconnect event, queued, so it was
reported twice, and a late one could tear down a reconnect already under way.
The event now counts only for the current socket, and not while we leave.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
session.ChatFeed decides which conversation a message, history, server
event or notice goes to and renders it; frontends get the lines through
chat.ChatSink and key conversations by chat.ChatKey. ServerSession.Listener
no longer passes on raw chat events. Swing now labels our own messages
with our nickname on the server and links our name to us in private chats.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
text.ByteSize writes sizes and rates as TeamSpeak does and replaces the
formatters in ChatHtml, FileBrowserDialog and ConnectionStatsFormat.
chat.ChatScope replaces ConnectionListener.ChatScope, ChatLogScope and
ChatPanel.Target, and the mappings between them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each setting is declared once with its key, type and range, and loaded
and saved from that list. Output device, volume and receive buffer, the
status bar and the master volume slider take effect through listeners
instead of calls wherever they change; Android does the same for output
settings and country flags. The Playback page previews voice volume with
the master volume applied.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ServerListDialog, ListEditorDialog and CtlOpusEncoder gain the Abstract
prefix. The list windows blank their status line with clearStatus() and
make icon-less menu items with item(text, action), instead of passing null.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
session.connection() is gone: the session hands out the model, our ids,
the microphone and speakers, ping and connection info, the server's
unique id, icon and avatar stores, myTeamSpeak, the connect error and a
blocking disconnectNow. The connection's remaining actions move into
helpers the session hands out instead of forwarding each method:
ClientAdmin (move, kick, ban, groups, talk power, poke, client details),
ChannelFiles (listing, mkdir, rename, delete, transfers and their
sounds) and ClientContacts (display names, volume, auto-mute, whisper
policy, sightings); ChannelAdmin also takes join, move, subscribe and
description requests. Dialogs take the session instead of the
connection.
Android's network handover now uses disconnectNow, which also cancels a
pending auto-reconnect.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OwnClient owns the microphone and speakers and our flags (mute, deafen,
away, commander, talk request, phonetic nickname, input hardware) and
publishes them; Recording owns the recorder. ServerSession reads the
flags from OwnClient instead of keeping its own copy, and they are now
cleared when a connect starts rather than once it is done.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The channel, ban, privilege key, complaint, server log, offline message
and avatar helpers are public, each method running in the background and
answering a future; only the connection creates them. TeamspeakConnection
and ServerSession hand them out, which drops 30 one-line forwarders from
the connection. What the forwarders added moves into the helpers: the
stop-at-the-first-refusal loops, the "sent" log lines, re-reading an
edited channel's description and showing our own new avatar. The
complaint and offline message length limits move with them.
The icon chooser and the offline message composer take only their
helper; the other dialogs still need the connection for the model.
The connection's request runner is renamed Uplink, since
session.ServerLink is the ts3server:// link.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ServerLink owns what lives from one connect to its teardown: the socket,
the thread ts3j dispatches events on, the threads requests run on and
the file transfer channel. It runs requests in the background and says
whether we are connected. The *Admin helpers take it, plus the model,
permissions or avatar store where they need them, instead of the whole
TeamspeakConnection; the connection's file transfer calls share its
"not connected" check instead of repeating it.
A myTeamSpeak refresh that fails because we left meanwhile is no longer
reported, as for every other request.
Also corrects 4a's commit hash in AUDIT-STRUCTURE.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChatLog opens the on-disk log once the server is known, hands frontends
the server and channel history, and saves sent and received messages and
the server tab's log lines; with logging off, everything still reaches
the app unsaved. Announcer tells the user what happened as TeamSpeak
does: the server-tab line with linked channels and clients, the sound
pack's sound with its name variables, and errors with the matching
"insufficient permissions" or "error" sound.
ConnectionEventHandler uses both directly instead of nine helpers on the
connection, which no longer holds the sound notifier. The connection's
public API is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rules were spread over ServerSession's can* methods, ServerModel's
permits/mayHavePower/canDelete*, TeamspeakConnection and AvatarAdmin, and
Swing dialogs and Android's ServerController passed raw permission names.
Permissions now holds the server's permission table and the rules (offered
until the server says, unreported powers unknown until asked) and answers
one named question per capability. ServerSession.permissions() is the gate
for frontends: Permissions.NONE, allowing nothing, while disconnected.
ServerController's forwarding properties go the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
onClientJoin set every field and onClientChanged set the same ones again
behind presence checks, so the two drifted: a client entering as channel
commander showed as none until they toggled it, and the description they
entered with was dropped. applyClientProperties now maps each field once,
only when the event carries it, as applyChannelProperties does for
channels; the update keeps its side effects (info refresh, contacts,
unread count, announcements).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Server requests on TeamspeakConnection took callbacks given a value and an
error string, null on success, so frontends told a permission refusal from
other failures by the message's wording (ban list, server log) and core
needed a sentinel message for a refused search. They now return a
CompletableFuture that fails with a RequestException carrying the kind
(not connected, permission, failed) and the server's reason.
Replies hands the outcome to a success or a failure handler on a given
executor; Swing's Edt runs them on the event thread, so call sites no
longer marshal by hand. Android's ServerController, whose suspend calls
answered a String? that was null once done, returns Result instead.
lookupDatabaseClient answers an Optional rather than null.
Starts the structural audit in AUDIT-STRUCTURE.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After a timeout or a server shutdown the session counts down and connects
again, back to the channel it was in, waiting 5, 10, 20, 40 and then 60 s
between attempts. A kick, a ban, leaving, or connecting elsewhere ends it, as
does a retry refused with a ban. The status bar shows the countdown with a
Cancel link. Off by default in core, so Android keeps its own NetworkFollower.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The main window comes back at its last size and position, maximised if it was;
a place no longer on any screen falls back to the default. The tree/chat
divider is saved like the tree/info one, and both keep their share of the
window as it is resized.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core keeps client_is_talker, the request's time and reason, and each
channel's needed talk power; clientedit grants or revokes, and "grant
next" picks whoever in our channel asked first, optionally revoking the
rest. The server refuses a request or a grant ("invalid parameter") from
or for a client that can already talk, so both are offered only to those
short of talk power. Grants dropped without an invoker (leaving the
channel, the channel's need changing) are not announced. Verified on a
local 3.13.7 server.
Desktop: Grant/Revoke Talk Power in the client menu, also for several
selected clients; the tree's badges in TeamSpeak's order (granted or
insufficient ahead of the groups, a request after them); the request's
reason in the info panel; log lines; the three talk power hotkeys. The
Self menu's request item shows only while it is needed.
Android: grant/revoke among the client sheet's admin actions, request or
cancel on our own sheet, the same badges in the tree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Asking for i_client_move_power and the like (permget) needs
b_client_permissionoverview_own, which custom moderator groups often lack
although they hold the powers; servergrouppermlist is refused too. A
refusal counted as 0, so Android hid actions the official client allows.
Now a refusal means unknown and the actions are offered, as the official
client always does, leaving the server to judge; only an answered 0 hides
them. Verified with such a group on a local 3.13.7 server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Desktop: Ctrl/Shift in the tree (ClientSelectionModel keeps a selection to
one row of any kind or several clients; a Shift range keeps its clients),
drag them onto a channel, or right-click for Kick Clients from Channel /
Server and Move Clients to own Channel. The selection survives rebuilds.
Android: long-press a client, tap more; a bar offers Move to…, Move to my
channel and both kicks (as far as we may), Back clears it.
Core sends one piped clientmove / clientkick. The server refuses the whole
pipe when one row fails ("already member of channel"), so it leaves out
clients already in the target, and for a channel kick those already in
the default channel, which the model now tracks (channel_flag_default).
Verified on a local 3.13.7 server with both frontends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bookmark editors (desktop dialog, Android screen) get TeamSpeak's
button beside the default channel, with its MAKE_CURRENT_CHANNEL_DEFAULT
icon: it takes the channel we are in, enabled while we are on the server
the form's address and port lead to (Sessions.connectedTo). The Android
channel sheet drops "Add to bookmarks"; the server sheet keeps it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Whispering can't be gated on permissions: our i_client_whisper_power is
never reported (and guests may not permget it), and whether a whisper gets
through depends on the target's needed whisper power, which clients can't
see. So the whisper menu and the Whisper / Add to whisper list actions are
shown only for servers connected from a bookmark that asks for them; an
edit of that bookmark applies without reconnecting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The channel menu (desktop) and channel sheet (Android) leave the entry out
when i_ft_file_browse_power is 0. Unlike move/kick/ban powers it is among the
needed permissions the server reports, and with it at 0 ftgetfilelist is
refused even where the channel needs no power (verified on a local 3.13.7).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signs clientinit with the account's Ed25519 key over the connection
challenge, honours the per-bookmark switch, sends updatemytsid on
sign-in/out, and connects without the ID when myTeamSpeak is unreachable.
Verified live against server.lixko.eu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TeamSpeak 6 syncs chat contacts as item class 8 (Item_Data field 25). They
are imported as friends keyed by myTeamSpeak ID, taken from the item or from
the partner's chat ID (@<base32 id>:<homeserver>), the same bytes servers
report as base64 client_myteamspeak_id. The contact list matches them to
clients through the ID each client carries.
Bookmarks gain TeamSpeak's "Enable myTeamSpeak features" switch
(send_mytsid_on_server), stored and imported but not yet sent; what is
still missing is noted in docs/myteamspeak/myteamspeak_server_signin.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bookmark.hostPort gives the address alone for port 9987 and address:port
otherwise. The Android connect screen, the myTeamSpeak item lists on
desktop and Android, and the display name of an unnamed bookmark use it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Java/Kotlin sources move from com.ts3client to eu.lixko.ts3j.client, and
the Android application id becomes eu.lixko.ts3j.client. The product name
shows as "TeamSpook TS3j" in window titles, the tray, the launcher entries,
notifications and PipeWire streams.
The desktop profile directory, WM_CLASS and ts3j.* system properties keep
their names so existing settings and launchers carry on working.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TeamSpeak stores sync items in creation order; each names the item above
it in its folder, and a reorder only rewrites those links. The decoder
now keeps that link and SyncOrder follows the chains, so items read from
settings.db or myTeamSpeak come out as the official client lists them,
a folder's contents in its place. Broken links and loops go last in
stored order. Bookmarks imported earlier keep their place.
The reordered.db fixture was written by the official client.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The channel and client sheets whisper to them or add them to a whisper
list. The top bar's whisper menu picks a list, replies to the last
whisper, stops whispering and edits the lists; a banner over the voice
bar says who the microphone whispers to.
Core keeps the whisper on the session, finding its channels by path and
its clients by unique id again as the server changes, and the saved lists
in whisperlists.properties. ts3j now sends whisper packets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A one-page channel editor with what the desktop dialog has but the
permissions and the icon: name, password, topic, description, type,
sorting, talk power, codec preset or codec and quality, and the limits.
Create channel is on the server sheet; create sub-channel, edit and
delete on the channel sheet, each only with the permission for it.
The codec list, presets and bandwidth move to core for both editors.
Core gains channel delete, and the desktop channel menu a Delete Channel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Add to home screen" in a bookmark's menu pins a shortcut that connects
to the bookmark, or goes to its channel when already on that server. The
shortcut names the bookmark by a new stable id, so it follows edits and
stops working once the bookmark is removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A link connects with its nickname, passwords, channel (path or cid) and
privilege key, the key used once on; addbookmark saves it as a bookmark.
A link to a server we are on already goes to its channel instead.
Android takes the links from browsers and other apps through an intent
filter, and from chat. The desktop opens them from chat and descriptions,
and its launcher entry claims the scheme when run from the jar; a second
launch hands its link to the running instance over a Unix socket in the
user's runtime directory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Edit from a bookmark's menu or create from the connect form: name,
address, passwords, identity, nickname, and the channel to join, picked
from the server's channels while connected there. The channel and server
sheets add the server as a bookmark joining that channel.
Bookmarking the current server takes the connect's own nickname and
password (core ServerSession.toBookmark), on desktop too, rather than the
global ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server returns every item class the account holds, not only the
requested ones, and add-on items come unencrypted. Decrypting them failed
the integrity check and aborted the whole import. Only decrypt the
classes that were asked for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A shared file goes to the sender's myTeamSpeak cloud storage, and an
ordinary text message carries TeamSpeak 6's ts.file.myts pointer to it, so
TeamSpeak 6 users see the file and we see theirs. Pictures show inline
through the description picture cache, other files as a link to save;
logged history shows them too. Sharing and fetching need a myTeamSpeak
sign-in.
Desktop: share button, drop or paste files and pictures, a picture viewer.
Android: attach from the system picker, tap to view or save.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ID is the account's base32 myTeamSpeak ID: the localpart of its chat
ID and the user the myTeamSpeak file API addresses. All three come from
the sign-in reply already fetched, on desktop and Android.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tools > Offline Messages (Ctrl+O) lists the server inbox, shows a message and
marks it read; compose and reply follow the official windows. The unread count
comes from client_unread_messages: new mail is logged with a link to the inbox
and shown as an envelope in the status bar. Recipients can be given by unique
id, which needs no search permission.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drain live mic frames each tick, raise capture priority, and hold a
high-performance Wi-Fi lock on Android so power saving stays off in the
background.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Design settings on desktop and Android offer a few see-through presets
that suit light and dark themes alike, or a custom colour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lay the window out as TeamSpeak 3's: name, times, ping and address
(with a copy button) beside the avatar, then Total / Speech / Keep Alive
/ Control tabs holding a Total / In / Out table, and a Quota tab. Android
gets the same tabs and table.
Wait for both notifyconnectioninfo reports for another client (the
server's cached copy, then the client's fresh counters) instead of
taking the first, often all zeros. Ask the server about ourselves too,
for our address and outgoing loss. Month transfer totals come from
clientgetvariables, our quota from the needed permissions, and file
transfers now count their bytes for our own transfer rate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new Extra buffering setting (Network page) holds more playback delay
than the jitter buffer measures it needs, so late packets still make
it in time on a bad connection. A lost frame is now rebuilt from the
FEC copy in the next packet when that one is already held, and the
Connection Info shows how many were recovered.
Held packets' arrival marks now move with the timeline when the delay
changes; libspeex leaves them, which made a multi-frame jump count
twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Connection Info gains a "Voice received" section on both frontends,
counting what our own playback made of a speaker's voice (everyone's,
for ourselves): packets received, frames played and missed, packets
out of order, dropped as too late, and discarded as copies. Android
gets the window itself as a page from the client sheet.
The rows and their formatting live in core, shared by both frontends;
the Swing dialog keeps its tabs on one row. A minute's bandwidth now
shows as the average rate it is labelled as, not the minute's bytes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Redundancy sends every voice packet again, one to four times, 20 to
200 ms apart. Listeners' jitter buffers grow to wait for the copies,
native clients' included, so a lost packet costs nothing while a copy
arrives. With a native client listening over a bursty lossy uplink,
the frames lost to concealment fell from 10% to under 1%.
Android gets the desktop's encoder settings: bitrate, complexity, VBR,
FEC, music codec, and the new redundancy delay and copies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A packet arriving after playback passed its slot was dropped before the
buffer saw it, so the buffer never learned how late packets ran and did
not grow to cover them. The official client puts every packet, however
late; such packets now reach the buffer too, without starting a new
talk burst.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stream.toList() is API 34; on Android 13 every settings save crashed
with NoSuchMethodError once the server log settings were stored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tools > Start Recording / Start Multitrack Recording / Stop Recording
record what is heard on the server, our own voice included, into Ogg
Opus, and publish client_is_recording. A plain recording mixes everyone
down to mono; a multitrack one gives each speaker (by unique id) an
uncoupled mono stream of their own under channel mapping family 255,
named in the tags after their nickname when the recording started,
silent until they first speak, and continuing into name-2.ogg past 255
speakers. Tracks are spooled beside the output and muxed on stop, since
the header carries the channel count.
The status bar shows a label that stops the recording; the existing
recording hotkeys start one straight into the last-used folder.
OggOpusFile now shares the new Ogg page writer and Opus header code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tools > Server Log (Ctrl+Shift+L), offered with b_virtualserver_log_view,
reads the virtual server's log with logview, a hundred lines at a time,
with Show Older going further back. As in TS3, lines can be narrowed by
level, left out by exclude terms, coloured by keyword, and shown in UTC
or local time; the choices are kept in the settings. The find bar, with
its show-only-matches toggle, takes the place of TS3's separate search
and filter fields.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tools > Complaints List (Ctrl+Shift+C) shows the server's complaints
grouped by target, with Remove, Reload and Ban Client, as TS3 does. The
client menu gains Make a Complaint below Poke. The complaint delete
permissions are missing from the needed-permissions subset, so they are
asked for alongside the move/kick/ban powers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A request asks for a reason, as TS3 does, and turns the item into Cancel
Talk Power Request until it is granted or withdrawn. The phonetic nickname
applies to the current server. client_talk_request carries the request's
timestamp, so any non-zero value now counts as a pending request.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>