summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-03-24 04:34:05 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-03-24 04:34:05 +0100
commitffcce28c7711ff69e46445c466bd439362e3d0d4 (patch)
tree85bbf5ab244f844dddd118a1112fdfcf795313df /src
parentc243fea660723eba00b65e639b76d0783cb59064 (diff)
downloadbiboumi-ffcce28c7711ff69e46445c466bd439362e3d0d4.tar.gz
biboumi-ffcce28c7711ff69e46445c466bd439362e3d0d4.tar.bz2
biboumi-ffcce28c7711ff69e46445c466bd439362e3d0d4.tar.xz
biboumi-ffcce28c7711ff69e46445c466bd439362e3d0d4.zip
Do not log a warning when we receive a PONG command
Diffstat (limited to 'src')
-rw-r--r--src/irc/irc_client.cpp4
-rw-r--r--src/irc/irc_client.hpp6
2 files changed, 10 insertions, 0 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index cbbd4ea..694baf8 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -281,6 +281,10 @@ void IrcClient::send_pong_command(const IrcMessage& message)
this->send_message(IrcMessage("PONG", {id}));
}
+void IrcClient::on_pong(const IrcMessage& message)
+{
+}
+
void IrcClient::send_ping_command()
{
this->send_message(IrcMessage("PING", {"biboumi"}));
diff --git a/src/irc/irc_client.hpp b/src/irc/irc_client.hpp
index 86edbab..03951be 100644
--- a/src/irc/irc_client.hpp
+++ b/src/irc/irc_client.hpp
@@ -70,6 +70,11 @@ public:
* Send the PONG irc command
*/
void send_pong_command(const IrcMessage& message);
+ /**
+ * Do nothing when we receive a PONG command (but also do not log that no
+ * handler exist)
+ */
+ void on_pong(const IrcMessage& message);
void send_ping_command();
/**
* Send the USER irc command
@@ -339,6 +344,7 @@ static const std::unordered_map<std::string, irc_callback_t> irc_callbacks = {
{"NICK", &IrcClient::on_nick},
{"MODE", &IrcClient::on_mode},
{"PING", &IrcClient::send_pong_command},
+ {"PONG", &IrcClient::on_pong},
{"KICK", &IrcClient::on_kick},
{"401", &IrcClient::on_generic_error},