(irc) Unban command
This commit is contained in:
parent
f69d07e2f7
commit
a697afbbd8
|
@ -280,6 +280,18 @@ IrcProtocol::Process(BMessage* msg)
|
||||||
_SendIrc(cmd);
|
_SendIrc(cmd);
|
||||||
break;
|
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:
|
case IM_ROOM_SEND_INVITE:
|
||||||
{
|
{
|
||||||
BString chat_id = msg->FindString("chat_id");
|
BString chat_id = msg->FindString("chat_id");
|
||||||
|
@ -768,6 +780,7 @@ IrcProtocol::_ProcessCommand(BString command, BString sender,
|
||||||
BMessage foot(IM_MESSAGE);
|
BMessage foot(IM_MESSAGE);
|
||||||
foot.AddInt32("im_what", IM_ROOM_PARTICIPANT_KICKED);
|
foot.AddInt32("im_what", IM_ROOM_PARTICIPANT_KICKED);
|
||||||
foot.AddString("chat_id", chat_id);
|
foot.AddString("chat_id", chat_id);
|
||||||
|
foot.AddString("user_name", _IdentNick(user_id));
|
||||||
foot.AddString("user_id", _NickIdent(user_id));
|
foot.AddString("user_id", _NickIdent(user_id));
|
||||||
if (params.CountStrings() == 3)
|
if (params.CountStrings() == 3)
|
||||||
foot.AddString("body", params.StringAt(2));
|
foot.AddString("body", params.StringAt(2));
|
||||||
|
|
Ŝarĝante…
Reference in New Issue