mIRC Home    About    Download    Register    News    Help

Print Thread
#147935 26/04/06 09:50 PM
D
DJmart
DJmart
D
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

#147936 26/04/06 10:03 PM
I
ik000ike
ik000ike
I
something like this ?

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

  

#147937 26/04/06 10:25 PM
D
DJmart
DJmart
D
not really, more like a !voiceall

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

#147938 26/04/06 10:33 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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

#147939 26/04/06 10:42 PM
D
DJmart
DJmart
D
which area does this script go?

#147940 26/04/06 10:48 PM
Joined: Apr 2005
Posts: 1,008
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
remotes (alt+r)

#147941 26/04/06 11:28 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
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.

#147942 26/04/06 11:39 PM
D
DJmart
DJmart
D
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

#147943 26/04/06 11:49 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Sorry change that $chan to $1.

-Andy

#147944 26/04/06 11:53 PM
D
DJmart
DJmart
D
Quote:
Sorry change that $chan to $1.

-Andy



which $chan theres two laugh

#147945 26/04/06 11:54 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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

#147946 26/04/06 11:56 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
It's still calling unnecessary code each time somebody joins.

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

#147947 26/04/06 11:59 PM
D
DJmart
DJmart
D
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

#147948 27/04/06 03:34 AM
Joined: Apr 2006
Posts: 399
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 399
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

#147949 27/04/06 06:41 AM
S
schaefer31
schaefer31
S
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.

#147950 27/04/06 08:49 PM
D
DJmart
DJmart
D
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

Last edited by DJmart; 27/04/06 09:02 PM.
#147951 27/04/06 11:16 PM
S
schaefer31
schaefer31
S
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
}

#147952 27/04/06 11:18 PM
S
schaefer31
schaefer31
S
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.

#147953 28/04/06 12:39 AM
D
DJmart
DJmart
D
WORKS GREAT!!!!

thank you ALL!


Link Copied to Clipboard