mIRC Home    About    Download    Register    News    Help

Print Thread
#113534 06/03/05 03:51 AM
Joined: Jan 2005
Posts: 25
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2005
Posts: 25
as the subject says.

just trying to get one to work

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on @*:text:!voice:#:{
var %a = $nick(#,0,a,v)
while %a > 0 { .mode # +v $nick(#,%a,a,v) | dec %a }
}
on @*:text:!devoice:#:{
var %a = $nick(#,0,v)
while %a > 0 { .mode # -v $nick(#,%a,v) | dec %a }
}

Joined: Nov 2004
Posts: 332
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
Code:
alias mvoice {
  set %n 1
  set %tn $nick(#, 0)
  while (%n <= %tn) {
    set %vnick $nick(#, %n)
    m.voice
    inc %n
  }
}

alias m.voice {
  [color:red]if (%vnick != $me) {[/color]
    mode $chan +v %vnick
  }
[color:red]}[/color]

[color:blue]menu nicklist {
  .mass modes 
  ..mass voice {
    mvoice
  }
}
[/color]

the above creates a popup that will voice everyone in a channel but you;
if ud like it to include you, omit the red text.
if you'd rahter have the alias and not the popup, omit the blue text.
the alias is mvoice
so to use type /mvoice or use the poup button in the nicklist.
good luck


The Kodokan will move you, one way or another.
Joined: Jan 2005
Posts: 25
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2005
Posts: 25
}}menu No such nick/channel
-
. is unknown mode char to me
-
voice No such nick/channel
-
}} No such nick/channel

^ thats what I get when I try to use the script

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Does your code look just like his?, I assume you decided to put the } on one lime with a command and you also decided to place them hard next to each other as in }}, try putting a space between them, or better yet make your code just like his.

Joined: Feb 2005
Posts: 194
A
Vogon poet
Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
You can use this:
Code:
menu nicklist {
  .Mass Voice:set %i $nick(#,0) | :next | if $nick(#,%i) != $me mode # +v $nick(#,%i) %kr | dec %i | if %i > 0 goto next
  .Mass De-Voice:set %i $nick(#,0) | :next | if $nick(#,%i) != $me mode # -v $nick(#,%i) %kr | dec %i | if %i > 0 goto next
}
Or... something similar to ricky_knuckles's code. I have given you the alias and popup. If you wish to not have the popup, simply delete it, and use /allvoice /alldevoice.
Code:
menu nicklist {
  .Mass Voice:allvoice
  .Mass De-Voice:alldevoice
}

alias allvoice {
  set %i $nick(#,0) 
  :next | if $nick(#,%i) != $me mode # +v $nick(#,%i) %kr 
  dec %i | if %i > 0 goto next
}
alias alldevoice { 
  set %i $nick(#,0) 
  :next | if $nick(#,%i) != $me mode # -v $nick(#,%i) %kr 
  dec %i | if %i > 0 goto next
}

Last edited by alhammer; 06/03/05 05:53 AM.
Joined: Nov 2004
Posts: 332
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
i find that directly pasting code from here to the edit box tends to go poorly you can try pasting to a word file or text document etc
that has worked for me sometimes
or it has been suggested to me that you "quote" the code
then everything remains the same
in order to facillitate you in this heres an uncolored copy of the code
Code:


alias mvoice {
  set %n 1
  set %tn $nick(#, 0)
  while (%n <= %tn) {
    set %vnick $nick(#, %n)
    m.voice
    inc %n
  }
}

alias m.voice {
  if (%vnick != $me) {
    mode $chan +v %vnick
  }
}

menu nicklist {
  .mass modes 
  ..mass voice {
    mvoice
  }
}




Last edited by ricky_knuckles; 06/03/05 06:40 AM.

The Kodokan will move you, one way or another.
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
All these mass voice/devoice methods are extremely inefficient and can easily cause excessive flooding. Instead of setting the mode once per user, you can do it all in one string like so:

Code:
alias mvoice {
  tokenize
  var %a = 1
  While ($Nick(#,%a,a,v)) {
    tokenize 32 $1- $v1
    inc %a
  }
  While ($0) {
    raw -q mode # $+(+,$Str(v,$0)) $($+($,1-,$Modespl),2)
    tokenize 32 $($+($,$Calc($Modespl + 1),-),2)
  }
}
alias mdevoice {
  tokenize
  var %a = 1
  While ($Nick(#,%a,v)) {
    tokenize 32 $1- $v1
    inc %a
  }
  While ($0) {
    raw -q mode # $+(-,$Str(v,$0)) $($+($,1-,$Modespl),2)
    tokenize 32 $($+($,$Calc($Modespl + 1),-),2)
  }
}


Syntax for mass voice: /mvoice
Syntax for mass devoice: /mdevoice


- Relinsquish
Joined: Jan 2005
Posts: 25
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2005
Posts: 25
what would I do if I wanted it to exclude ops?

I am using Relinsquish's script

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Change
Code:
  While ($Nick(#,%a,a,v)) {
to
Code:
  While ($Nick(#,%a,r)) {


Link Copied to Clipboard