diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-05-11 05:31:11 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-05-11 05:31:11 +0200 |
commit | 7fe0dc2667229287ab9f1825e84403a25bc863fe (patch) | |
tree | 216621cb41a5db87026d594c5ffc1cacd76bb785 /src/bridge/bridge.cpp | |
parent | ad5bd99618fd4f1ee92d48d90912d627187aaa11 (diff) | |
download | biboumi-7fe0dc2667229287ab9f1825e84403a25bc863fe.tar.gz biboumi-7fe0dc2667229287ab9f1825e84403a25bc863fe.tar.bz2 biboumi-7fe0dc2667229287ab9f1825e84403a25bc863fe.tar.xz biboumi-7fe0dc2667229287ab9f1825e84403a25bc863fe.zip |
Fix the case of the nick for ping requests
fix #3041
Diffstat (limited to 'src/bridge/bridge.cpp')
-rw-r--r-- | src/bridge/bridge.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index 16264d4..4bfd1b2 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -409,13 +409,13 @@ void Bridge::send_irc_user_ping_request(const std::string& irc_hostname, const s Iid iid(nick + "!" + irc_hostname); this->send_private_message(iid, "\01PING " + iq_id + "\01"); - irc_responder_callback_t cb = [this, nick, iq_id, to_jid, irc_hostname, from_jid](const std::string& hostname, const IrcMessage& message) -> bool + irc_responder_callback_t cb = [this, nick=utils::tolower(nick), iq_id, to_jid, irc_hostname, from_jid](const std::string& hostname, const IrcMessage& message) -> bool { if (irc_hostname != hostname) return false; IrcUser user(message.prefix); const std::string body = message.arguments[1]; - if (message.command == "NOTICE" && user.nick == nick && + if (message.command == "NOTICE" && utils::tolower(user.nick) == nick && message.arguments.size() >= 2 && body.substr(0, 6) == "\01PING ") { const std::string id = body.substr(6, body.size() - 6); |