1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:38:12 +00:00

IRCClient: Add application and context menu items to hop/dehop users

This commit is contained in:
Brendan Coles 2020-04-08 17:12:37 +00:00 committed by Andreas Kling
parent 755b206618
commit 5c90cfa90f
5 changed files with 64 additions and 0 deletions

View file

@ -107,6 +107,20 @@ IRCWindow::IRCWindow(IRCClient& client, void* owner, Type type, const String& na
m_client.handle_devoice_user_action(m_name.characters(), m_client.nick_without_prefix(nick.characters()));
}));
m_context_menu->add_action(GUI::Action::create("Hop", [&](const GUI::Action&) {
auto nick = channel().member_model()->nick_at(member_view.selection().first());
if (nick.is_empty())
return;
m_client.handle_hop_user_action(m_name.characters(), m_client.nick_without_prefix(nick.characters()));
}));
m_context_menu->add_action(GUI::Action::create("DeHop", [&](const GUI::Action&) {
auto nick = channel().member_model()->nick_at(member_view.selection().first());
if (nick.is_empty())
return;
m_client.handle_dehop_user_action(m_name.characters(), m_client.nick_without_prefix(nick.characters()));
}));
m_context_menu->add_action(GUI::Action::create("Op", [&](const GUI::Action&) {
auto nick = channel().member_model()->nick_at(member_view.selection().first());
if (nick.is_empty())