Add the contact list (friends, blocked, neutral)
Mirrors the TeamSpeak 3 client's Contacts: clients can be filed as friend,
blocked or neutral from their context menu or by dragging them into the
Contacts window, given a custom and phonetic nickname, shown under either
name or both, and per contact muted automatically, ignored in server/channel
or private chat and pokes, have their away message hidden and whispers
allowed or denied. Friends are green and blocked clients red in the tree
(optional), new contacts start from per-type defaults ("Set Defaults"), and
the global whisper policy lives in Options -> Contacts. "Change Volume..."
adds a per-client dB gain that a contact entry remembers.
Contacts are stored in ~/.ts3jclient/contacts.txt using the exact record
format the official client keeps in the Contacts table of its settings.db
(field names and codes recovered from the binary), so entries move between
the two verbatim. A small read-only pure-Java SQLite reader imports the
official client's list on first run and on demand, without a driver.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,8 @@ final class MainMenuBar extends JMenuBar {
|
||||
|
||||
void onShowIdentities();
|
||||
|
||||
void onShowContacts();
|
||||
|
||||
/** Whether the current server lets us read its ban list; asked as the Tools menu opens. */
|
||||
boolean canViewBanList();
|
||||
|
||||
@@ -123,12 +125,15 @@ final class MainMenuBar extends JMenuBar {
|
||||
JMenu tools = new JMenu("Tools");
|
||||
JMenuItem identitiesItem = new JMenuItem("Identities…", Icons.of("IDENTITY_MANAGER"));
|
||||
identitiesItem.addActionListener(e -> listener.onShowIdentities());
|
||||
JMenuItem contactsItem = new JMenuItem("Contacts…", Icons.ofAny("CONTACT", "EDIT_FRIEND_FOE_STATUS"));
|
||||
contactsItem.addActionListener(e -> listener.onShowContacts());
|
||||
banListItem = new JMenuItem("Ban List", Icons.of("BAN_LIST"));
|
||||
banListItem.addActionListener(e -> listener.onShowBanList());
|
||||
JMenuItem options = new JMenuItem("Options…", Icons.of("SETTINGS"));
|
||||
options.addActionListener(e -> listener.onShowSettings());
|
||||
JPopupMenu.Separator banListSeparator = new JPopupMenu.Separator();
|
||||
tools.add(identitiesItem);
|
||||
tools.add(contactsItem);
|
||||
tools.addSeparator();
|
||||
tools.add(banListItem);
|
||||
tools.add(banListSeparator);
|
||||
|
||||
Reference in New Issue
Block a user