diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-05-19 06:16:49 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-05-19 06:22:04 +0200 |
commit | e8d7965115fe6abe25d76bccedd450532549891e (patch) | |
tree | 0973400425a1af0924607de73f1ee7e0e77c837e /src/bridge | |
parent | fa466f33f4c8009e69fe0ebf31c7eef1c394377b (diff) | |
download | biboumi-e8d7965115fe6abe25d76bccedd450532549891e.tar.gz biboumi-e8d7965115fe6abe25d76bccedd450532549891e.tar.bz2 biboumi-e8d7965115fe6abe25d76bccedd450532549891e.tar.xz biboumi-e8d7965115fe6abe25d76bccedd450532549891e.zip |
Handle errors for the LIST irc command
ref #2472
Diffstat (limited to 'src/bridge')
-rw-r--r-- | src/bridge/bridge.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index 467923b..c63b3da 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -317,8 +317,14 @@ void Bridge::send_irc_channel_list_request(const Iid& iid, const std::string& iq if (irc_hostname != iid.get_server()) return false; - if (message.command == "263" || message.command == "RPL_TRYAGAIN") - { // TODO send an error iq + if (message.command == "263" || message.command == "RPL_TRYAGAIN" || + 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; } else if (message.command == "322" || message.command == "RPL_LIST") |