diff options
-rw-r--r-- | src/irc/irc_client.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index d048e47..905a336 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -314,6 +314,10 @@ void IrcClient::on_notice(const IrcMessage& message) const std::string to = message.arguments[0]; const std::string body = message.arguments[1]; + if (!body.empty() && body[0] == '\01' && body[body.size() - 1] == '\01') + // Do not forward the notice to the user if it's a CTCP command + return ; + if (!to.empty() && this->chantypes.find(to[0]) == this->chantypes.end()) { // The notice is for us precisely. |