mIRC Home    About    Download    Register    News    Help

Print Thread
#111656 17/02/05 11:23 PM
Joined: May 2004
Posts: 39
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2004
Posts: 39
Well I'd like to have a masive voice script that actually works.

And what it is, that every time I go into a room I'm operator in it voices everybody. In any channel I join that I'm operator in. The ones I've made have been broken and stop working, or only work in one chanel.


Do the monkey!
#111657 18/02/05 12:01 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Put these scripts together in a remote file:

Code:
On !*:op:#:{
  if $opnick == $me { massmode v # }
}


Code:
; /massmode o|h|v [#channel]
;
; Gives the specified mode letter
; to those who don't have it.
 
alias massmode {
  var %chan = $iif($2 ischan, $2, #)
  if !$1 || !%chan { return }
  var %i = 1, %nicks
  while $nick(%chan, %i, a, $1) {
    %nicks = %nicks $ifmatch
    if $numtok(%nicks, 32) == $modespl {
      mode %chan + $+ $str($1, $modespl) %nicks
      %nicks =
    }
    inc %i
  }
  if $numtok(%nicks, 32) { 
    mode %chan + $+ $str($1, $ifmatch) %nicks
  }
}


To avoid the risk of flooding yourself off the server with this script, enable mIRC's flood protection under Alt+O >> IRC >> Flood and remember to tick the "Op commands" box.

#111658 18/02/05 12:08 AM
Joined: May 2004
Posts: 39
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2004
Posts: 39
bleh it's not working for me.


Do the monkey!
#111659 18/02/05 12:23 AM
Joined: May 2004
Posts: 39
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: May 2004
Posts: 39
Oh never mind, wink thanks


Do the monkey!
#111660 18/02/05 01:37 AM
Joined: Jun 2004
Posts: 133
S
Vogon poet
Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
/mv

mv {
%k.num = 0
%k.total = $nick(#,0)
%k.kick = 0
:loop
inc %k.num 1
if ( %k.num > %k.total ) { goto done }
elseif ( $nick(#,%k.num) == $me ) { goto loop }
else {
inc %k.kick 1
mode # +v $nick(#,%k.num)
goto loop
}
:done
unset %k.*
}

#111661 18/02/05 02:01 AM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
That's a very bad way of doing it. Your script actually sets +v on each and every single person per command.

Instead of setting the modes like this:
+vvv Nick1 Nick2 Nick 3

It will set the modes like this:
+v Nick1
+v Nick2
+v Nick3

Using Online's way, the voices will be set all on one instance without flooding the room or yourself. smile

By the way, using /var and while loops would be quicker and cleaner. Thought I would just point some of these things out.


- Relinsquish
#111662 19/02/05 09:22 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
Could anyone add something in the good script so that it doesn't revoice voiced people, and doesn't voice people who are opped (result: it should only change mode for people with no modes when running the script)

#111663 20/02/05 08:38 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Try this (I didn't laugh)
Code:
; /massmode o|h|v [#channel]
;
; Gives the specified mode letter
; to those who don't have it.

alias massmode {
  var %chan = $iif($2 ischan,$2,#)
  if !$1 || !%chan { return }
  var %i = 1, %nicks, %a = $lf $+ $left($nickmode,$pos($nickmode,$1,1))
  while $nick(%chan,%i,a,%a) {
    %nicks = %nicks $v1
    if $numtok(%nicks, 32) == $modespl { mode %chan + $+ $str($1,$v1) %nicks | var %nicks }
    inc %i
  }
  if $numtok(%nicks, 32) { mode %chan + $+ $str($1,$v1) %nicks }
}

#111664 21/02/05 08:24 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
Seems to work after a couple of little tests smile
Thanx!


Link Copied to Clipboard