Commit e8d79651 authored by louiz’'s avatar louiz’

Handle errors for the LIST irc command

ref #2472
parent fa466f33
...@@ -317,8 +317,14 @@ void Bridge::send_irc_channel_list_request(const Iid& iid, const std::string& iq ...@@ -317,8 +317,14 @@ void Bridge::send_irc_channel_list_request(const Iid& iid, const std::string& iq
if (irc_hostname != iid.get_server()) if (irc_hostname != iid.get_server())
return false; return false;
if (message.command == "263" || message.command == "RPL_TRYAGAIN") if (message.command == "263" || message.command == "RPL_TRYAGAIN" ||
{ // TODO send an error iq message.command == "ERR_TOOMANYMATCHES" || message.command == "ERR_NOSUCHSERVER")
{
std::string text;
if (message.arguments.size() >= 2)
text = message.arguments[1];
this->xmpp->send_stanza_error("iq", to_jid, std::to_string(iid), iq_id,
"wait", "service-unavailable", text, false);
return true; return true;
} }
else if (message.command == "322" || message.command == "RPL_LIST") else if (message.command == "322" || message.command == "RPL_LIST")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment