Add the Tools > Ban List window
Reimplements the official client's ban list: a searchable table of the server's bans with Add / Remove / Edit, an own-ban filter and highlight, choosable columns, and the Add/Edit dialog whose IP and name patterns can be read as IPv4/IPv6 wildcards, fixed strings or regular expressions (translated to the regexes banadd takes exactly as the official client does). Editing is add-then-delete, since the protocol has no banedit. The ban list is read from the notifybanlist burst that answers banlist, like channelpermlist. The menu item is only shown where the server grants b_client_ban_list. Also fixes ServerModel numbering permissions from 0 instead of 1, which had every selfPermissionValue() lookup reading the neighbouring permission — including the group-assignment menus. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,7 @@ final class ServerTabConnectionEvents implements ConnectionListener {
|
||||
chatPanel.setServerName(null);
|
||||
chatPanel.setChannelName(null);
|
||||
chatPanel.appendSystem("Disconnected" + (reason == null || reason.isEmpty() ? "." : ": " + reason));
|
||||
tab.banListServerChanged(false);
|
||||
host.tabDisconnected(tab);
|
||||
});
|
||||
}
|
||||
@@ -108,6 +109,7 @@ final class ServerTabConnectionEvents implements ConnectionListener {
|
||||
if (conn.isConnected() && name != null && !name.isBlank() && !name.equals(tab.title())) {
|
||||
listener.setTitle(name);
|
||||
host.tabUpdated(tab);
|
||||
tab.banListServerChanged(true);
|
||||
}
|
||||
if (conn.isConnected()) {
|
||||
chatPanel.setServerName(name);
|
||||
|
||||
Reference in New Issue
Block a user