mIRC Home    About    Download    Register    News    Help

Topic Options
#147935 - 26/04/06 10:50 PM Voice script [req]
DJmart Offline
Pikka bird

Registered: 12/11/05
Posts: 13
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

Top
#147936 - 26/04/06 11:03 PM Re: Voice script [req]
ik000ike Offline
Babel fish

Registered: 28/12/04
Posts: 87
something like this ?

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

  

Top
#147937 - 26/04/06 11:25 PM Re: Voice script [req]
DJmart Offline
Pikka bird

Registered: 12/11/05
Posts: 13
not really, more like a !voiceall

and that will trigger a voice to all users in the channels I specify

Top
#147938 - 26/04/06 11:33 PM Re: Voice script [req]
SladeKraven Offline
Planetary brain

Registered: 19/12/02
Posts: 3547
Loc: Kent, England
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

Top
#147939 - 26/04/06 11:42 PM Re: Voice script [req]
DJmart Offline
Pikka bird

Registered: 12/11/05
Posts: 13
which area does this script go?

Top
#147940 - 26/04/06 11:48 PM Re: Voice script [req]
raZOR Offline
Hoopy frood

Registered: 06/04/05
Posts: 1009
Loc: Green Hill Zone
remotes (alt+r)
_________________________
IceCapped

Top
#147941 - 27/04/06 12:28 AM Re: Voice script [req]
hixxy Offline
Hoopy frood

Registered: 06/09/05
Posts: 2876
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.

Top
#147942 - 27/04/06 12:39 AM Re: Voice script [req]
DJmart Offline
Pikka bird

Registered: 12/11/05
Posts: 13
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

Top
#147943 - 27/04/06 12:49 AM Re: Voice script [req]
SladeKraven Offline
Planetary brain

Registered: 19/12/02
Posts: 3547
Loc: Kent, England
Sorry change that $chan to $1.

-Andy

Top
#147944 - 27/04/06 12:53 AM Re: Voice script [req]
DJmart Offline
Pikka bird

Registered: 12/11/05
Posts: 13
Quote:
Sorry change that $chan to $1.

-Andy



which $chan theres two laugh

Top
#147945 - 27/04/06 12:54 AM Re: Voice script [req]
SladeKraven Offline
Planetary brain

Registered: 19/12/02
Posts: 3547
Loc: Kent, England
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

Top
#147946 - 27/04/06 12:56 AM Re: Voice script [req]
hixxy Offline
Hoopy frood

Registered: 06/09/05
Posts: 2876
It's still calling unnecessary code each time somebody joins.

Code:
on *:op:#:{
  if ($opnick == $me) voiceall $chan
}
on @*:join:#: mode $chan +v $nick

Top
#147947 - 27/04/06 12:59 AM Re: Voice script [req]
DJmart Offline
Pikka bird

Registered: 12/11/05
Posts: 13
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

Top
#147948 - 27/04/06 04:34 AM Re: Voice script [req]
Kurdish_Assass1n Offline
Fjord artisan

Registered: 11/04/06
Posts: 400
Loc: Nashville, Tennessee
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
_________________________
-Kurdish_Assass1n

Top
#147949 - 27/04/06 07:41 AM Re: Voice script [req]
schaefer31 Offline
Fjord artisan

Registered: 27/08/05
Posts: 525
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.

Top
#147950 - 27/04/06 09:49 PM Re: Voice script [req]
DJmart Offline
Pikka bird

Registered: 12/11/05
Posts: 13
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


Edited by DJmart (27/04/06 10:02 PM)

Top
#147951 - 28/04/06 12:16 AM Re: Voice script [req]
schaefer31 Offline
Fjord artisan

Registered: 27/08/05
Posts: 525
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
}

Top
#147952 - 28/04/06 12:18 AM Re: Voice script [req]
schaefer31 Offline
Fjord artisan

Registered: 27/08/05
Posts: 525
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.

Top
#147953 - 28/04/06 01:39 AM Re: Voice script [req]
DJmart Offline
Pikka bird

Registered: 12/11/05
Posts: 13
WORKS GREAT!!!!

thank you ALL!

Top