(irc) Unban command

This commit is contained in:
Jaidyn Ann 2021-08-16 18:18:22 -05:00
parent f69d07e2f7
commit a697afbbd8

View File

@ -280,6 +280,18 @@ IrcProtocol::Process(BMessage* msg)
_SendIrc(cmd);
break;
}
case IM_ROOM_UNBAN_PARTICIPANT:
{
BString chat_id = msg->FindString("chat_id");
BString user_id = msg->FindString("user_id");
if (chat_id.IsEmpty() == false && user_id.IsEmpty() == false) {
BString cmd("MODE ");
cmd << chat_id << " -b " << _IdentNick(user_id) << "!*@*";
_SendIrc(cmd);
}
break;
}
case IM_ROOM_SEND_INVITE:
{
BString chat_id = msg->FindString("chat_id");
@ -768,6 +780,7 @@ IrcProtocol::_ProcessCommand(BString command, BString sender,
BMessage foot(IM_MESSAGE);
foot.AddInt32("im_what", IM_ROOM_PARTICIPANT_KICKED);
foot.AddString("chat_id", chat_id);
foot.AddString("user_name", _IdentNick(user_id));
foot.AddString("user_id", _NickIdent(user_id));
if (params.CountStrings() == 3)
foot.AddString("body", params.StringAt(2));