OP'ing more than 3 people via nicklist menu

Added by mike ekim over 2 years ago

OP'ing more than 3 people via nick-list menu is not allowed even though their names are selected and highlighted.

For example:

I select/highlight 4 non-op's and try to OP them. Only 3 will get op'd even though 4 nicks are highlighted.

Is this normal behaviour?

How can I select, 4-10 users and OP them via nick-list menu. Seems like a simple feature I had in xchat/hexchat.

Replies (1)

RE: OP'ing more than 3 people via nicklist menu - Added by Paul Janson over 2 years ago

This is a nested issue. First you look at the line you're executing, then look at the alias which it executes.

In alt+P window, click on nicklist, and you'll find the relevant line:

.$iif(o isin $nickmode,Give Op,):op $$1 $2 $3 $4 $5

This limits opping to 5 nicks, so if you want to op more than this, you could change it to either:
op $$1 $2-
mode $chan $str(o,$0) $$1 $2-

However each server has a limit to how many modes it will allow at the same time, and this is shown by the $modespl identifier, which is defined based on seeing MODES=12 or some other number, in the reply you see in "/version" as you connect.

However, the above line executes the 'op' alias, which is contained in commands.ini, and looks like:

/op /mode # +ooo $$1 $2 $3

which means this is hard coded to be no more than 3 op'ings. You can change it as i suggested above, and it should work for the lesser of the number of nicks you highlight and the number in $Modespl.

It seems some newer servers are starting to show an error message if you send +ooo along with fewer than 3 nicks, so you can prevent this by making the 'op' alias like:

/op var %a $0 | if (%a > $$modespl) var %a $modespl | mode $chan $str(o,%a) $$gettok($$1-,1- %a,32)

$0 contains the number of how many $1 etc tokens exist, and $gettok is limiting how many of them are sent. The double dollar halts if that identifier returns a null value.