Use the CHANTYPES values to differentiate channel or user notices

It also happens to fix #2517 because this used to create buggy channels
named "auth" and stuf like that.
This commit is contained in:
Florent Le Coz
2014-05-27 02:30:11 +02:00
parent 796af0531e
commit aea923bcb9
+1 -1
View File
@@ -245,7 +245,7 @@ void IrcClient::on_notice(const IrcMessage& message)
const std::string to = message.arguments[0]; const std::string to = message.arguments[0];
const std::string body = message.arguments[1]; const std::string body = message.arguments[1];
if (to == this->current_nick) if (!to.empty() && this->chantypes.find(to[0]) == this->chantypes.end())
this->bridge->send_xmpp_message(this->hostname, from, body); this->bridge->send_xmpp_message(this->hostname, from, body);
else else
{ {