1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09: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
Notes: sideshowbarker 2024-07-19 07:47:36 +09:00
5 changed files with 64 additions and 0 deletions

View file

@ -367,6 +367,16 @@ void IRCClient::send_devoice_user(const String& channel_name, const String& nick
send(String::format("MODE %s -v %s\r\n", channel_name.characters(), nick.characters()));
}
void IRCClient::send_hop_user(const String& channel_name, const String& nick)
{
send(String::format("MODE %s +h %s\r\n", channel_name.characters(), nick.characters()));
}
void IRCClient::send_dehop_user(const String& channel_name, const String& nick)
{
send(String::format("MODE %s -h %s\r\n", channel_name.characters(), nick.characters()));
}
void IRCClient::send_op_user(const String& channel_name, const String& nick)
{
send(String::format("MODE %s +o %s\r\n", channel_name.characters(), nick.characters()));
@ -1008,6 +1018,16 @@ void IRCClient::handle_devoice_user_action(const String& channel, const String&
send_devoice_user(channel, nick);
}
void IRCClient::handle_hop_user_action(const String& channel, const String& nick)
{
send_hop_user(channel, nick);
}
void IRCClient::handle_dehop_user_action(const String& channel, const String& nick)
{
send_dehop_user(channel, nick);
}
void IRCClient::handle_op_user_action(const String& channel, const String& nick)
{
send_op_user(channel, nick);