mIRC Home    About    Download    Register    News    Help

Print Thread
#224984 23/08/10 12:59 PM
Joined: Sep 2003
Posts: 41
koitsu Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Sep 2003
Posts: 41
It seems mIRC doesn't support/honour the MODES capability setting as defined by server numeric response 005. Example:

ircd-ratbox-2.2.8(20080111_7-24916). irc.server.com egGHIKMpZ TS6ow 1SC
CHANTYPES=&# EXCEPTS INVEX CHANMODES=eIb,k,l,imnpst CHANLIMIT=&#:16 PREFIX=(ov)@+ MAXLIST=beI:75 NETWORK=mynet MODES=4 STATUSMSG=@+ KNOCK CALLERID=g are supported by this server

While selecting 4 nicknames in the GUI and choosing Control -> Op results in:

[05:53] * mynick sets mode: +ooo nick1 nick2 nick3

Reference material:

http://www.irc.org/tech_docs/005.html
http://www.irc.org/tech_docs/draft-brocklesby-irc-isupport-03.txt

5
5618
5618
5
While I understand what you mean, this is not something which is dynamically handled.
If you go to the Popups section in the scripts editor (Alt+P) and select Nick List from the View menu, you'll see that the standard command there is: /mode # +ooo $$1 $2 $3

Naturally you can adjust this to include $4,$5,...,$n

Alternatively you could try to catch raw 005 and set a network-specific variable to adjust this to whatever value is permitted.

mIRC *could* be changed to do this automatically and this may count as a feature suggestion in your case. However, if I remember correctly, the contents of raw 005 is not consistent and uniform enough across IRCds for this to work.

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
the easiest way to dynamically deal with the modes limit is to use a script. $modespl returns the numbers of modes a network allows.

Just make a loop that separates how many ever nicks you give to it and have it do them in groups. I did this for an auto voice script. If you want help with a script just ask and i'll whip something up.

Edit:
whether you want it or not i'm finally gonna make myself a nice little script for right clicking multiple nicks to do, op/hop/voice and deop/dehop/devoice

Last edited by pball; 23/08/10 03:13 PM.
Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
mIRC "supports" MODES through $modespl

The popups that come with mIRC, however, are meant to be simple examples for users to customize. As mentioned, the +ooo behaviour has nothing to do with lack of "support" for MODES, but rather it's the hardcoded behaviour of the popup for simplicity. If mIRC included complicated routines in the default popups, it would confuse most users who are new to scripting and they would be less able to customize them. Note that mIRC never uses any complicated looping or conditional structures in any aliases/popups for this reason.

This kind of behaviour is left for users to script, which mIRC fully supports. Generally, there's no reason for mIRC to support this behaviour out of the box. Regardless of a server's MODES reply, users rarely need to op/deop more than 3 users at once, it's just not that common. If they do, they can script it. I think that's fair.

For reference, a $modespl aware version of the op popup would be:

Code:
.Op:/mode # $+(+,$str(o,$modespl)) $($+($,1-,$modespl),2)

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
Ok after a few days of doing nothing I made a handy little script

Right click options
Code:
$iif($me isop $chan,Op Controls)
.+o:$set_mode(+,o,$chan,$1-)
.-o:$set_mode(-,o,$chan,$1-)
.+h:$set_mode(+,h,$chan,$1-)
.-h:$set_mode(-,h,$chan,$1-)
.+v:$set_mode(+,v,$chan,$1-)
.-v:$set_mode(-,v,$chan,$1-)
$iif($me ishop $chan && $me !isop $chan,Hop Controls)
.+h:$set_mode(+,h,$chan,$1-)
.-h:$set_mode(-,h,$chan,$1-)
.+v:$set_mode(+,v,$chan,$1-)
.-v:$set_mode(-,v,$chan,$1-)

Alias code
Code:
set_mode {
  set -l %nicks $4-
  set -l %num 1
  set -l %time 0
  while ($gettok(%nicks,%num,32)) {
    set -l %temp %temp $gettok(%nicks,%num,32)
    if ($numtok(%temp,32) == $modespl) { .timer -m 1 %time mode $3 $1 $+ $str($2,$modespl) %temp | unset %temp | inc %time 500 }
    inc %num
  }
  if (%temp) .timer -m 1 %time mode $3 $1 $+ $str($2,$modespl) %temp
}


If you follow the pattern of calling the alias you can also use it to set any nick related mode, such as q,a,e,I, etc depending on the network.

If you find a problem just hunt me down

Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
Is there a reason you're using an alias as an identifier?

/set_mode + o # $1- is much more legible, imo.

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
hmm didn't think of that, i just started making it. that's why I like input on stuff

edit:
tsk, i can understand having a time limit for editing posts but that also sucks since you can't fix stuff or just get rid of it, so you don't confuse people if you mess something up.

Last edited by pball; 27/08/10 09:17 PM.

Link Copied to Clipboard