Skip to content

Commit a52f72f

Browse files
committed
qt: add copy IP/Netmask action banned peer
This adds a copy IP/Netmask context menu action for peers in the banned peer table
1 parent 201c5e4 commit a52f72f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/qt/rpcconsole.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,14 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
706706

707707
// create ban table context menu
708708
banTableContextMenu = new QMenu(this);
709+
/*: Context menu action to copy the IP/Netmask of a banned peer.
710+
IP/Netmask is the combination of a peer's IP address and it's Netmask.
711+
For IP Address see: https://en.wikipedia.org/wiki/IP_address
712+
For NetMask see: https://wiki.teltonika-networks.com/view/What_is_a_Netmask%3F */
713+
banTableContextMenu->addAction(tr("&Copy IP/Netmask"), [this] {
714+
GUIUtil::copyEntryData(ui->banlistWidget, BanTableModel::Address, Qt::DisplayRole);
715+
});
716+
banTableContextMenu->addSeparator();
709717
banTableContextMenu->addAction(tr("&Unban"), this, &RPCConsole::unbanSelectedNode);
710718
connect(ui->banlistWidget, &QTableView::customContextMenuRequested, this, &RPCConsole::showBanTableContextMenu);
711719

0 commit comments

Comments
 (0)