mIRC Home    About    Download    Register    News    Help

Print Thread
#103151 16/11/04 11:47 PM
Joined: Sep 2004
Posts: 7
K
kash1f Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Sep 2004
Posts: 7
How can we voice every user after setting channel in +m .
alias or remote !! anyone!!!
[have to voice all the existing users who were in channel before +m mode]

#103152 17/11/04 01:22 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
on @*:rawmode:#:{ massmode $chan +v }
alias massmode {
  if ($me ison $1) {
    var %i = 1, %n
    while (%i <= $nick($1,0)) {
      %n = $addtok(%n,$nick($1,%i),32)
      inc %i
    }
    while (%n != $null) { 
      mode $1 $+($left($2,1),$str($mid($2,2),$calc($modespl * $len($mid($2,2))))) $gettok(%n,$+(1-,$modespl),32)
      %n = $deltok(%n,$+(1-,$modespl),32)
    }
  }
}


New username: hixxy
#103153 17/11/04 01:35 AM
Joined: Nov 2004
Posts: 13
S
Pikka bird
Offline
Pikka bird
S
Joined: Nov 2004
Posts: 13
that or select every nick in the list..right click

Code:
menu nicklist {
  Voice everyone:/mode # +v $*
}

#103154 18/11/04 12:37 AM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
Quote:
that or select every nick in the list..right click

Code:
menu nicklist {
  Voice everyone:/mode # +v $*
}


that won't work, you need 1 'v' for each nick you want to voice
next to that you have the server limitation of the number of modes per line (which at most networks is set to a default of 6)

so at max you can change 6 modes in 1 mode command


If it ain't broken, don't fix it!
#103155 18/11/04 12:43 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
It will work, but it will set the mode on each user seperatly, that means if there are 50 people, it'll set the mode 50 times, which isn't a good idea.

That solution should only be used if it's on a very small amount of people, and even then, i'd go with setting multiple nicks in 1 mode.

The reason it'll work btw, is because of the $* identifier. It's undocumented in the help file, but is mentioned in the versions.txt

Basically it's calling the command /mode for each nick selected, so if you select 20 people and use that code, /mode will be called 20 times.

As an example of how $* works:

1. //tokenize 32 one two three four | echo -a $*

2.
alias blabla inc %x | echo -a %x - $1-
//tokenize 32 one two three four | blabla $*

Greets


Gone.
#103156 18/11/04 12:46 AM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
aha, didn't see that one before :-P thanks for the info


If it ain't broken, don't fix it!

Link Copied to Clipboard