]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Send * for empty targets in the no such nick/channel message.
authorPeter Powell <petpow@saberuk.com>
Tue, 3 Dec 2019 12:02:41 +0000 (12:02 +0000)
committerPeter Powell <petpow@saberuk.com>
Tue, 3 Dec 2019 12:09:15 +0000 (12:09 +0000)
include/numericbuilder.h

index 4431fbc527f5bd3edd14fc22676c7c66de3f2c36..dc95cdaf70d4f0e533f825dd691210571114ba87 100644 (file)
@@ -257,7 +257,7 @@ class Numerics::NoSuchChannel : public Numeric::Numeric
        NoSuchChannel(const std::string& chan)
                : Numeric(ERR_NOSUCHCHANNEL)
        {
-               push(chan);
+               push(chan.empty() ? "*" : chan);
                push("No such channel");
        }
 };
@@ -269,7 +269,7 @@ class Numerics::NoSuchNick : public Numeric::Numeric
        NoSuchNick(const std::string& nick)
                : Numeric(ERR_NOSUCHNICK)
        {
-               push(nick);
+               push(nick.empty() ? "*" : nick);
                push("No such nick");
        }
 };