]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Send ERR_BADCHANMASK when trying to OJOIN/SAJOIN an invalid channel.
authorSadie Powell <sadie@witchery.services>
Sat, 8 May 2021 16:17:29 +0000 (17:17 +0100)
committerSadie Powell <sadie@witchery.services>
Sat, 8 May 2021 16:21:04 +0000 (17:21 +0100)
src/modules/m_ojoin.cpp
src/modules/m_sajoin.cpp

index 8bc264622da870e16d9ac1fbb2710a4d8f6ce450..8b0683700e4b2e3f858e68207d69ee652d5a25a3 100644 (file)
@@ -49,7 +49,7 @@ class CommandOjoin : public SplitCommand
                // Make sure the channel name is allowable.
                if (!ServerInstance->IsChannel(parameters[0]))
                {
-                       user->WriteNotice("*** Invalid characters in channel name or name too long");
+                       user->WriteNumeric(ERR_BADCHANMASK, parameters[0], "Invalid channel name");
                        return CMD_FAILURE;
                }
 
index 05229efb9257e017b748ca3ebcbda0a9ff15a4e5..62783d9016e7286aa418aa800c2d23bd8d2ffe36 100644 (file)
@@ -66,7 +66,7 @@ class CommandSajoin : public Command
                        if (IS_LOCAL(user) && !ServerInstance->IsChannel(channel))
                        {
                                /* we didn't need to check this for each character ;) */
-                               user->WriteNotice("*** Invalid characters in channel name or name too long");
+                               user->WriteNumeric(ERR_BADCHANMASK, channel, "Invalid channel name");
                                return CMD_FAILURE;
                        }