View Issue Details

IDProjectCategoryView StatusLast Update
0005545unrealircdpublic2020-01-31 16:25
Reporterwestor Assigned Tosyzop  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version5.0.2 
Summary0005545: max-targets-per-command doesn't excepts IRCops
DescriptionHello,

I was trying to use /ame to send a message on all channels that i am on (10 or more) and i got an error "#channel5 Too many targets. The maximum is 4 for PRIVMSG." , the strange is that i am IRCop and it should bypass that as it doesn't.

As i understand "immune:target-limit " seems broken here..

OperClass:

operclass service {
    permissions {
        blocknotls;
        sanick;
        saumode;
        kill;
        chat;
        client;
        immune;
        self;
        sacmd;
        server;
        server-ban;
        services;
        route { local; };
        channel {
            operonly;
            see;
            override {
                invite;
                kick;
                message;
                privsecret;
                secureonly;
                topic;
                mlock;
            };
        };
    };
};

- Thanks!
3rd party modules

Activities

westor

2020-01-28 23:31

reporter   ~0021271

Probably solution :P (not for sure):

https://github.com/unrealircd/unrealircd/blob/63b77796ed40f27d061eab6244f0c658d6c580d6/src/modules/message.c#L301

Change:

if (MyUser(client) && (++ntargets > maxtargets))

To:

if (MyUser(client) && (!ValidatePermissionsForPath("immune:target-limit",client,NULL,NULL,NULL)) && (++ntargets > maxtargets))

Lord255

2020-01-29 00:05

reporter   ~0021272

fyi:
i have netadmin with override and i cannot reproduce this on v5.0.1
i joined 7 channels (#test1;-7) and then did a /ame and /amsg. all msgs appeared in the channels, no error msg received.

k4be

2020-01-29 07:25

developer   ~0021274

/ame and /amsg are client commands, clients know, what to do with them (using multiple PRIVMSGs probably).
The client should conform to the isupport tag: TARGMAX=DCCALLOW:,ISON:,JOIN:,KICK:4,KILL:,LIST:,NAMES:1,NOTICE:1,PART:,PRIVMSG:4,SAJOIN:,SAPART:,USERHOST:,USERIP:,WATCH:,WHOIS:1,WHOWAS:1
This message is sent before one has a chance to become an oper, so changing the setting after /oper is not a very good idea. There is a separate (and set by default) solution for opers that allow them to address multiple targets in a short time, using separate commands: fake lag exception.
Another question is: why is there an idea to message multiple channels at once?

syzop

2020-01-29 08:50

administrator   ~0021275

First, to get this out of the way: immune:target-limit is for bypassing set::anti-flood::max-concurrent-conversations. The immune:xxx option should probably be renamed. This TARGMAX has nothing to do with that...

Now, about bypassing TARGMAX by opers, I was going to write a whole text about this, but k4be already said it all.. I would just be repeating every point that he said.

syzop

2020-01-29 08:53

administrator   ~0021276

And I have now updated the documentation at https://www.unrealircd.org/docs/Set_block#set::max-targets-per-command

syzop

2020-01-29 09:08

administrator   ~0021277

Last edited: 2020-01-29 09:09

And immune permission renamed since it was indeed confusing:

commit 0302ef9733840e091d786ef0beb34a54c21c7577 (HEAD -> unreal50, origin/unreal50)
Author: Bram Matthys <[email protected]>
Date: Wed Jan 29 09:00:32 2020 +0100

    Operclass permission change: immune:target-limit is now called
    immune:max-concurrent-conversations since it bypasses
    set::anti-flood::max-concurrent-conversations.
    Indirectly reported by westor.

https://github.com/unrealircd/unrealircd/commit/0302ef9733840e091d786ef0beb34a54c21c7577

(operclass docs also updated, doubt the specific immune type is used much so i didn't bother leaving the old name somewhere and mention it <5.0.3 etc)

syzop

2020-01-31 16:25

administrator   ~0021282

Marking as 'fixed', but more of a documentation fix (see previous messages) :)

Issue History

Date Modified Username Field Change
2020-01-28 23:05 westor New Issue
2020-01-28 23:31 westor Note Added: 0021271
2020-01-29 00:05 Lord255 Note Added: 0021272
2020-01-29 07:25 k4be Note Added: 0021274
2020-01-29 08:44 syzop Priority high => normal
2020-01-29 08:50 syzop Note Added: 0021275
2020-01-29 08:53 syzop Note Added: 0021276
2020-01-29 09:08 syzop Note Added: 0021277
2020-01-29 09:09 syzop Note Edited: 0021277
2020-01-31 16:25 syzop Assigned To => syzop
2020-01-31 16:25 syzop Status new => closed
2020-01-31 16:25 syzop Resolution open => fixed
2020-01-31 16:25 syzop Note Added: 0021282