mIRC Home    About    Download    Register    News    Help

Print Thread
Auto-voicing script. #208999 02/02/09 11:08 PM
Joined: Oct 2008
Posts: 167
S
seanturner70 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
Currently, a network that I am helping out on, is having problems.
It is mainly a flash based web chat, so users open up a new web page for each chat, and get a -1, -2, -3 next to their name for each other chat they are in. They are usually voiced automatically... however the network has a fault, so only the nickname without the -1, -2, -3 is voiced, the rest of them do not get voiced. The network have given no ETA to how long till it is fixed... till then, the network helpers are needing to go into each channel, and automatically voiced the people who are registered and have a -1, -2 or -3 next to the name.

I am in need of 2 scripts...
One that will voice everyone if their name has a -1, -2 or -3 next to the name, and does not start with "ustreamer-" when they join.
I get hop'ed in channels when I join.

I tried:
Code:
on *:JOIN:#: {
  if ($network == Ustream)
    if ($me !ishop $chan) && (Ustream-* ison $chan) && ($nick != Ustreamer-*) { /part $chan brb | /join $chan | .timer 1 5 /mode $chan +v $nick | msg $chan $nick $+ : Voiced }
    elseif ($me ishop $chan) && ($nick != ustreamer-*) { /mode $chan +v $nick | msg $chan $nick $+ : Voiced }
  }
}


However, this is voicing everyone that enters. I am not sure how to sort it.

Secondly, it is not possible to be on all the channels on the network at the same time. Meaning that you need to enter, look, voice, and leave...

I am wondering if there is a script that when I join a channel, to "scan" for nicknames that are not "Ustreamer-#####", do not have voice, and have a -1, -2 or -3 at the end of their name, and voice them.

Sorry, it is probably not a great script in the first place.

Re: Auto-voicing script. [Re: seanturner70] #209000 02/02/09 11:39 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
1)
Code:
on *:join:#:{
  if $nick($chan,$me,oh) {
    if ($right($nick,1) isnum 1-3) && (Ustream !isin $nick) {
     .mode $chan +v $nick
    }
  }
}

2)
Code:
on me:*:join:#:{
  .who $chan
}
on *:op:#:{
  if $opnick == $me {    check_nick $chan  }
}
on *:help:#:{
  if $hnick == $me {    check_nick $chan  }
}
alias check_nick {
  var %a = $nick($1,0,a,v)
  while %a {
    var %unick = $nick($1,%a,a,v)
    if (Ustream !isin %unick) && ($right($v2,1) isnum 1-3) {
      .mode $1 +v %unick
    }
    dec %a
  }
}

Technically the .who $chan in the 2nd script should not be necessary, however, it does ensure that your IAL is up-to-date.

Re: Auto-voicing script. [Re: RusselB] #209001 02/02/09 11:55 PM
Joined: Oct 2008
Posts: 167
S
seanturner70 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
Thanks, it should help a lot smile

Re: Auto-voicing script. [Re: RusselB] #209002 03/02/09 12:24 AM
Joined: Jul 2006
Posts: 3,745
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,745
I have to say that you're doing your while on all users in the channel but voice, whereas you could/should do it on all 'not voice' nick with $nvnick, works like $nick($chan,N) smile


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Auto-voicing script. [Re: Wims] #209003 03/02/09 01:58 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
1) I was unaware of $nvnick
2) $nvnick is not in the help file that accompanies mIRC 6.35
2a) Since it is not in the help file, I have no knowledge as to what (if any) parameters are required and/or optional.
3) Based on your description, it does the same thing as my while loop using $nick($chan,0,a,v)

Re: Auto-voicing script. [Re: RusselB] #209004 03/02/09 02:17 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Doing a google search gives me two of these identifiers back from mirc version v4.72: $nopnick(#,N) $nvnick(#,N)

I'm not sure why they are not documented.

Re: Auto-voicing script. [Re: Tomao] #209005 03/02/09 03:18 AM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Quoting "Undocumented mIRC v0.9" (The thread about this file can be found here)
Quote:
$opnick(#,N/nick)
This has been superceded by $nick(#,N/nick,o)
With a third and fourth parameter, i.e. $opnick(#,N/nick,aohvr,aohvr), this identifier behaves exactly the same as $nick(#,N/nick,aohvr,aohvr)

$nopnick(#,N/nick)
This has been superceded by $nick(#,N/nick,rvh,o)
With a third and fourth parameter, i.e. $nopnick(#,N/nick,aohvr,aohvr), this identifier behaves exactly the same as $nick(#,N/nick,aohvr,aohvr)
Note: This identifier does not refer to the first person that is not opped, but refers to the first person of lower status than op, which will always be a regular, a voice or a halfopped user. It does not include voiced ops.

$hnick(#,N/nick)
This has been superceded by $nick(#,N/nick,h)
With a third and fourth parameter, i.e. $hnick(#,N/nick,aohvr,aohvr), this identifier behaves exactly the same as $nick(#,N/nick,aohvr,aohvr)

$nhnick(#,N/nick)
This has been superceded by $nick(#,N/nick,rv,ho)
With a third and fourth parameter, i.e. $nhnick(#,N/nick,aohvr,aohvr), this identifier behaves exactly the same as $nick(#,N/nick,aohvr,aohvr)
Note: This identifier does not refer to the first person that is not halfopped, but refers to the first person of lower status than halfop, which will always be a regular or a voiced user. It does not include voiced ops or halfops.

$vnick(#,N/nick)
This has been superceded by $nick(#,N/nick,v)
With a third and fourth parameter, i.e. $vnick(#,N/nick,aohvr,aohvr), this identifier behaves exactly the same as $nick(#,N/nick,aohvr,aohvr)

$nvnick(#,N/nick)
This has been superceded by $nick(#,N/nick,r)
With a third and fourth parameter, i.e. $nvnick(#,N/nick,aohvr,aohvr), this identifier behaves exactly the same as $nick(#,N/nick,aohvr,aohvr)
Note: This identifier does not refer to the first person that is not voiced, but refers to the first person of lower status than voice, which will always be a regular user.

$rnick(#,N/nick)
This has been superceded by $nick(#,N/nick,r)
With a third and fourth parameter, i.e. $rnick(#,N/nick,aohvr,aohvr), this identifier behaves exactly the same as $nick(#,N/nick,aohvr,aohvr)

Identifiers had been introduced: (acc. to "mIRC Script Box" v1.20, get it e.g. here)
$nopnick - mIRC v4.5
$vnick - mIRC v4.72
$hnick - mIRC v5.4
$nhnick - mIRC v5.4
$rnick - mIRC v5.5
$nvnick - mIRC v5.5
smile

Last edited by Horstl; 03/02/09 03:30 AM.
Re: Auto-voicing script. [Re: Horstl] #209007 03/02/09 04:03 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Gee...thanks for the information, Horstl!

Re: Auto-voicing script. [Re: Horstl] #209047 03/02/09 04:41 PM
Joined: Oct 2008
Posts: 167
S
seanturner70 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
Thanks for the extra info Horstl smile