1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:14:46 +02:00

Get rid of old confusing comment in src/parse.c regarding commands with 0 flags

if (cmptr->flags != 0) { /* temporary until all commands are updated */

But that is impossible, as CommandAdd()->CommandAddInternal() already has:

if (!flags)
{
        config_error("CommandAdd(): Could not add command '%s': flags are 0", cmd);

And this is the case since commit ceb04cc3eb
from July 15, 2015.
This commit is contained in:
Bram Matthys
2026-02-22 08:03:23 +01:00
parent 059abc4b56
commit 43da14f7c6
-2
View File
@@ -443,7 +443,6 @@ static void parse2(Client *cptr, Client **fromptr, MessageTag *mtags, int mtags_
ircstats.is_unco++;
return;
}
if (cmptr->flags != 0) { /* temporary until all commands are updated */
/* Logic in comparisons below is a bit complicated, see notes */
@@ -460,7 +459,6 @@ static void parse2(Client *cptr, Client **fromptr, MessageTag *mtags, int mtags_
/* If you're a server, but command doesn't want servers, deny */
if ((flags & CMD_SERVER) && !(cmptr->flags & CMD_SERVER))
return;
}
/* If you're a user, but not an operator, and this requires operators, deny */
if ((cmptr->flags & CMD_OPER) && (flags & CMD_USER) && !(flags & CMD_OPER))