mIRC Homepage
Posted By: DJmart Voice script [req] - 26/04/06 09:50 PM
Can anyone please create a script that will VOICE users who are NOT voiced in channels I have access in?

I'm not sure how to go about doing this.

Thanks! shocked
Posted By: ik000ike Re: Voice script [req] - 26/04/06 10:03 PM
something like this ?

Code:
on *:join:* { if ($nick !== $me) { 
    mode # +v $nick
  }
}

  
Posted By: DJmart Re: Voice script [req] - 26/04/06 10:25 PM
not really, more like a !voiceall

and that will trigger a voice to all users in the channels I specify
Posted By: SladeKraven Re: Voice script [req] - 26/04/06 10:33 PM
Code:
alias voiceall {
  var %x = 1
  while (%x <= $nick($1,0)) {
    if ($nick($1,%x) !isvo $1) mode $chan +v $nick($1,%x)
    inc %x
  }
}

On @*:Join:#: {
  voiceall $chan
}


*When someone joins the channel all users who aren't voiced will be.
*Or type /voiceall <#Channel> to voice all who aren't.

-Andy
Posted By: DJmart Re: Voice script [req] - 26/04/06 10:42 PM
which area does this script go?
Posted By: raZOR Re: Voice script [req] - 26/04/06 10:48 PM
remotes (alt+r)
Posted By: hixxy Re: Voice script [req] - 26/04/06 11:28 PM
Code:
On @*:Join:#: {
  mode $chan +v $nick
}


This would make more sense. There's no need to call /voiceall when you're only voicing one person.
Posted By: DJmart Re: Voice script [req] - 26/04/06 11:39 PM
Quote:
Code:
alias voiceall {
  var %x = 1
  while (%x &lt;= $nick($1,0)) {
    if ($nick($1,%x) !isvo $1) mode $chan +v $nick($1,%x)
    inc %x
  }
}

On @*:Join:#: {
  voiceall $chan
}


*When someone joins the channel all users who aren't voiced will be.
*Or type /voiceall <#Channel> to voice all who aren't.

-Andy



It doesn't seem to work..... its in remotes
Posted By: SladeKraven Re: Voice script [req] - 26/04/06 11:49 PM
Sorry change that $chan to $1.

-Andy
Posted By: DJmart Re: Voice script [req] - 26/04/06 11:53 PM
Quote:
Sorry change that $chan to $1.

-Andy



which $chan theres two laugh
Posted By: SladeKraven Re: Voice script [req] - 26/04/06 11:54 PM
He doesn't want one person voiced. He wants them all voiced. It's so when someone joins the channel it gives everyone a voice that don't have one.

Saves them having to type /voiceall <#Channel> for every channel he's on. That'd probably be simpler if the channel activity is next to none.

DJ: I was about to edit that post, the $chan in the alias. smile

-Andy
Posted By: hixxy Re: Voice script [req] - 26/04/06 11:56 PM
It's still calling unnecessary code each time somebody joins.

Code:
on *:op:#:{
  if ($opnick == $me) voiceall $chan
}
on @*:join:#: mode $chan +v $nick
Posted By: DJmart Re: Voice script [req] - 26/04/06 11:59 PM
Quote:
He doesn't want one person voiced. He wants them all voiced. It's so when someone joins the channel it gives everyone a voice that don't have one.

Saves them having to type /voiceall <#Channel> for every channel he's on. That'd probably be simpler if the channel activity is next to none.

DJ: I was about to edit that post, the $chan in the alias. smile

-Andy



I'm not sure its realling working.... heh i saved it in remotes, and changed what you said. i type /voiceall #slava

and it takes awhile before it does it......... any idea why the delay
Posted By: Kurdish_Assass1n Re: Voice script [req] - 27/04/06 03:34 AM
Code:
ON *:TEXT:*:*: {
  if ($1 !isop $chan) &amp;&amp; ($nick !isvo $chan) &amp;&amp; ($nick !ishop $chan) &amp;&amp; ($me isop $chan) {
    cs voice $chan $nick
  }
}



Can you not use this Sir DJmart? shocked
Posted By: schaefer31 Re: Voice script [req] - 27/04/06 06:41 AM
There's certainly no need to be checking $nick everytime something is said. I think the better method here would be to combine hixxy and SladeKraven's codes.

Code:
on @*:JOIN:[color:red]#YourChannel[/color]:{
  mode $chan +v $nick
}

alias voiceall {
  if ($me !isop $1) {
    echo -a Error: You are not opped on $1
  }
  else {
    var %i = 1, %l = $nick($1,0)
    while (%i &lt;= %l) {
      if ($nick($1,%i) !isvo $1) {
        mode $1 +v $nick($1,%i)
      }
      inc %i
    }
  }
}

menu nicklist {
  Voice All:voiceall
}


This voices all users on join.

It also puts an item in your nick list menu for voicing everyone. Simply click on it and it will voice any unvoiced nicks in the channel.

It makes more sense to do it this way then scan the entire nicklist everytime someone joins.
Posted By: DJmart Re: Voice script [req] - 27/04/06 08:49 PM
Can we make that work for every channel? (that im in)

I am in multiple channels, that I have +o in. But I don't want it to be just one channel.

Nice script btw.

EDIT:
script constantly gives: "Error: You are not opped on"
on selection of Voice All
Posted By: schaefer31 Re: Voice script [req] - 27/04/06 11:16 PM
Sorry, I forgot to include the channel parameter with the nicklist item. You can make it work for other channels simply by adding them to the on join event. I've given an example in red.

Code:
on @*:JOIN:[color:red]#Channel1,#Channel2,#Channel3[/color]:{
  mode $chan +v $nick
}

alias voiceall {
  if ($me !isop $1) {
    echo -a Error: You are not opped on $1
  }
  else {
    var %i = 1, %l = $nick($1,0)
    while (%i &lt;= %l) {
      if ($nick($1,%i) !isvo $1) {
        mode $1 +v $v1
      }
      inc %i
    }
  }
}

menu nicklist {
  Voice All:voiceall $chan
}
Posted By: schaefer31 Re: Voice script [req] - 27/04/06 11:18 PM
Or instead of listing channels like I showed, you can just replace the channel list with just #. It will then work for all channels that you are opped in. The @ prefix at the beginning will prevent it from executing if you are not opped in a given channel.
Posted By: DJmart Re: Voice script [req] - 28/04/06 12:39 AM
WORKS GREAT!!!!

thank you ALL!
© mIRC Discussion Forums