Handle KICK in irc channel, both ways

This commit is contained in:
Florent Le Coz
2013-11-13 01:24:36 +01:00
parent 3cfaab9a2d
commit 0859801230
6 changed files with 128 additions and 0 deletions
+12
View File
@@ -122,6 +122,13 @@ void Bridge::send_irc_nick_change(const Iid& iid, const std::string& new_nick)
irc->send_nick_command(new_nick);
}
void Bridge::send_irc_kick(const Iid& iid, const std::string& target, const std::string& reason)
{
IrcClient* irc = this->get_irc_client(iid.server);
if (irc)
irc->send_kick_command(iid.chan, target, reason);
}
void Bridge::send_message(const Iid& iid, const std::string& nick, const std::string& body, const bool muc)
{
std::string utf8_body = this->sanitize_for_xmpp(body);
@@ -180,3 +187,8 @@ std::string Bridge::get_own_nick(const Iid& iid)
return irc->get_own_nick();
return "";
}
void Bridge::kick_muc_user(Iid&& iid, const std::string& target, const std::string& reason, const std::string& author)
{
this->xmpp->kick_user(iid.chan + "%" + iid.server, target, reason, author, this->user_jid);
}