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>
The ban list, complaints, privilege keys, offline messages and server
log windows each built the same frame, title, status line, key bindings,
load guard and reload-after-change. ServerListDialog does that once;
ServerTab keeps the open windows in one map.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MainCommands holds each command once: the plain ones act on the server
on screen, the ones taking a list of sessions serve hotkeys, which reach
the selected server or every connected one. The menu bar, toolbar and
HotkeyActions call it directly, so both Listener interfaces and the
forwarding in MainFrame are gone.
The menu's mute items no longer click the toolbar's buttons, and its
commander toggle now repaints the toolbar and tray.
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>