mIRC Home    About    Download    Register    News    Help

Print Thread
Help Auto Voice Script ? #138723 05/01/06 11:10 PM
Joined: Jan 2004
Posts: 133
W
WarlockW Offline OP
Vogon poet
OP Offline
Vogon poet
W
Joined: Jan 2004
Posts: 133
what we need is a script that voices people
the script needs to version those nicks on join.. and autovoice them if the version reply is a match

if it gives that correct reply, voice it.. if not, not voice it

on *:JOIN:*: {
/ctcp $nick version
if ( version == mIRC v6.16 Khaled Mardam-Bey )
/mode #snoop +v $nick
}


Any Ideas ???

Re: Help Auto Voice Script ? #138724 06/01/06 12:00 AM
Joined: Oct 2005
Posts: 122
O
onesikgypo Offline
Vogon poet
Offline
Vogon poet
O
Joined: Oct 2005
Posts: 122
Code:
on *:JOIN:*: {
  ctcp $nick VERSION
  set %nick $nick
  set %chan $chan
}
on *:CTCPREPLY:VERSION*: {
  if (mIRC v6.16 Khaled Mardam-Bey isin $1-) {
    mode %chan +v %nick
  }
}


there might b a better way to do it, but that should do it

Re: Help Auto Voice Script ? #138725 06/01/06 12:07 AM
Joined: Jun 2005
Posts: 127
H
HAMM3R Offline
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
Make sure to unset those variables, so that someone wont get voiced twice if you happened to do a version yourself.
Code:
on *:CTCPREPLY:VERSION*: {
  if (mIRC v6.16 Khaled Mardam-Bey isin $1-) {
    mode %chan +v %nick
    unset %nick | unset %chan
  }
}


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Re: Help Auto Voice Script ? #138726 06/01/06 03:13 AM
Joined: Jan 2004
Posts: 133
W
WarlockW Offline OP
Vogon poet
OP Offline
Vogon poet
W
Joined: Jan 2004
Posts: 133
thanks guys smile

on 1:load:{
echo -a 08 Loading Auto Voice 1.0 ...
set %voiceroom $$?="What Room You Want This To Work In ? IE: #test"
set %versioninfo $$?="Set Version Info Here! IE: VERSION mIRC v6.16 Khaled Mardam-Bey"
set %versionnick $$?="Set Nick Info Here! IE: [sv]"
echo -a 08 Loaded Auto Voice 1.0 ...
}

on 1:START:{
echo -a 08 Loading Auto Voice 1.0 ...
}

on 1:CTCPREPLY:VERSION*:{
var %ver $1-
if ( %ver == %versioninfo ) goto AOK
goto NOTOK
:AOK
/mode %voiceroom +v $nick
:NOTOK
}

on *:JOIN:*: {
if ( %versionnick isin $nick ) goto Checkit
goto nocheck
:checkit
/ctcp $nick version
:nocheck
}

Is what I came up with smile

Re: Help Auto Voice Script ? #138727 08/01/06 03:35 AM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
There's a small problem with your code in that it will attempt to voice an user if you do a CTCP VERSION the manual way. You should use a flag variable to prevent this.

Code:
on 1:CTCPREPLY:VERSION*:{
  if (%flag) {
    var %ver $1-
    if ( %ver == %versioninfo ) goto AOK
    goto NOTOK
    :AOK
    /mode %voiceroom +v $nick
    :NOTOK
  }
  unset %flag
}

on *:JOIN:#:{
  if ( %versionnick isin $nick ) goto Checkit
  goto nocheck
  :checkit
  set %flag $true
  /ctcp $nick version
  :nocheck
}

Re: Help Auto Voice Script ? #138728 08/01/06 04:09 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You should also try to eliminate goto commands

Here's schaefer's code rewritten without the goto's

Code:
 on *:ctcpreply:cersion*:{
if %flag && ($1- == %versioninfo) {
.mode %voiceroom +v $nick
unset %flag
}
}
on *:join:#:{
if ($nick isin %versionnick) {
set %flag $true
.ctcp $nick version
}
}