mIRC Home    About    Download    Register    News    Help

Print Thread
version question #178604 12/06/07 02:08 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Any reason why it wont kick something like this?
/\Black_Inviter_v1.01/\ By: henry /\
Code:
 
on $*:text:/^!ctcp (on|off)/Si:*:{ 
  if $nick isop $chan {
    set $+(%,ctcp,.,$chan) $iif($2 == on,$true,$false)
  }
  elseif !$chan {
    var %a = 1, %b = $comchan($nick,0)
    while %a <= %b {
      if $nick isop $comchan($nick,%a) {
        set $+(%,ctcp,.,$comchan($nick,%a)) $iif($2 == on,$true,$false)
 
      }
      inc %a
    }
  }
}
 on @*:join:#:{
 if $($+(%,ctcp,.,$chan),2) && !$($+(%,version.check,.,$address),2) {
 .ctcp $nick VERSION
 set -e $+(%,version.check,.,$address) $chan
 }
 }
on *:ctcpreply:version*:{
  if $($+(%,version.check,.,$address),2) {
    if !$hget(vercheck) { hmake vercheck 10 }
    filter -c CTCP.txt CTCP.txt ?*
    if $filtered { hdel -w vercheck * | hload -n vercheck CTCP.txt }
    if $hfind(vercheck,$strip($2-),1,R).data { ban -k $($+(%,version.check,.,$address),2) $nick 2 14Bad Script Detected }
    halt
  }
}


Re: version question [Re: Garou] #178609 12/06/07 02:39 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
It seems to work for me, maybe you aren't putting the version replies in the CTCP correctly?

Re: version question [Re: SladeKraven] #178615 12/06/07 05:18 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
What do you mean? show me exemple please!!

Re: version question [Re: Garou] #178616 12/06/07 05:34 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well, I put Khaled in the file CTCP.txt, and when I opened another mIRC and joined a channel, I was kicked and banned. Also, you should make sure it is actually setting the variables.

Re: version question [Re: SladeKraven] #178617 12/06/07 05:37 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Yes for a single word it works fine but when it has stuff like < - _ = / or # this it wont trigger.

Last edited by Garou; 12/06/07 05:58 PM.
Re: version question [Re: Garou] #178695 13/06/07 07:44 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Is it possible to use this line to turn on/off ?

if ( %CTCPREPLY == off ) || ( %CTCPREPLY == $null ) { return }

instead of this

on $*:text:/^!ctcp (on|off)/Si:*:{

Re: version question [Re: Garou] #178696 13/06/07 07:49 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Then what would be the trigger in the On Text event? Why don't you just stick tge code in a group.

Re: version question [Re: SladeKraven] #178697 13/06/07 07:51 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
because in my dialogs i use check/uncheck box to turn on/off

Re: version question [Re: Garou] #178699 13/06/07 07:53 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I didn't mean put your dialogs in a group, I meant your CTCP portion, like this..

Code:
#CTCP off
on @*:join:#:{
 if $($+(%,ctcp,.,$chan),2) && !$($+(%,version.check,.,$address),2) {
 .ctcp $nick VERSION
 set -e $+(%,version.check,.,$address) $chan
 }
 }
on *:ctcpreply:version*:{
  if $($+(%,version.check,.,$address),2) {
    if !$hget(vercheck) { hmake vercheck 10 }
    filter -c CTCP.txt CTCP.txt ?*
    if $filtered { hdel -w vercheck * | hload -n vercheck CTCP.txt }
    if $hfind(vercheck,$strip($2-),1,R).data { ban -k $($+(%,version.check,.,$address),2) $nick 2 14Bad Script Detected }
    halt
  }
}
#CTCP end

Re: version question [Re: SladeKraven] #178701 13/06/07 07:57 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
cause i didnt know how hehe, ok now Can I use it like this to be able to turn on/off from my dialog check/uncheck box?

#CTCP off
on @*:join:#:{
if ( %CTCP == off ) || ( %CTCP == $null ) { return }
if $($+(%,ctcp,.,$chan),2) && !$($+(%,version.check,.,$address),2) {
.ctcp $nick VERSION
set -e $+(%,version.check,.,$address) $chan
}
}
on *:ctcpreply:version*:{
if $($+(%,version.check,.,$address),2) {
if !$hget(vercheck) { hmake vercheck 10 }
filter -c CTCP.txt CTCP.txt ?*
if $filtered { hdel -w vercheck * | hload -n vercheck CTCP.txt }
if $hfind(vercheck,$strip($2-),1,R).data { ban -k $($+(%,version.check,.,$address),2) $nick 2 14Bad Script Detected }
halt
}
}
#CTCP end

Re: version question [Re: Garou] #178703 13/06/07 08:01 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Yes, but with your check boxes you're going to have to change your code a little:

.enable #CTCP (Enables your events)
.disable #CTCP (Disables your events)

So just put those commands in the code for your checkboxes.

Re: version question [Re: SladeKraven] #178704 13/06/07 08:05 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
ok here wat i have already so wat do I change?

if (%CTCPREPLY == on) { did -c $dname 41 }

and

if ($did(41).state == 1) { set %CTCPREPLY on }
else { set %CTCPREPLY off }

Re: version question [Re: Garou] #178705 13/06/07 08:11 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
if ($group(#CTCP) == on) { did -c $dname 41 }

if ($did(41).state == 1) { .enable #CTCP }
else { .disable #CTCP }

Re: version question [Re: SladeKraven] #178706 13/06/07 08:23 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Is this ok? It didnt version on join.

#CTCPREPLY off
on @*:join:#:{
if ( %CTCPREPLY == off ) || ( %CTCPREPLY == $null ) { return }
if $($+(%,ctcp,.,$chan),2) && !$($+(%,version.check,.,$address),2) {
.ctcp $nick VERSION
set -e $+(%,version.check,.,$address) $chan
}
}
on *:ctcpreply:version*:{
if $($+(%,version.check,.,$address),2) {
if !$hget(vercheck) { hmake vercheck 10 }
filter -c CTCP.txt CTCP.txt ?*
if $filtered { hdel -w vercheck * | hload -n vercheck CTCP.txt }
if $hfind(vercheck,$strip($2-),1,R).data { ban -k $($+(%,version.check,.,$address),2) $nick 2 14Bad Script Detected }
halt
}
}
#CTCPREPLY end

Re: version question [Re: Garou] #178708 13/06/07 08:33 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Your enable and disable buttons aren't working very well, not at all actually. As it should read..

#CTCPREPLY on
..your code
#CTCTREPLY end

You need to take out this line:
if ( %CTCPREPLY == off ) || ( %CTCPREPLY == $null ) { return }

Make sure your codes check button code looks like..

if ($group(#CTCPREPLY) == on) { did -c $dname 41 }

if ($did(41).state == 1) { .enable #CTCPREPLY }
else { .disable #CTCPREPLY }




Re: version question [Re: SladeKraven] #178710 13/06/07 08:41 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Yes I did all that and I still dont version on join.

#CTCPREPLY on
on @*:join:#:{
if $($+(%,ctcp,.,$chan),2) && !$($+(%,version.check,.,$address),2) {
.ctcp $nick VERSION
set -e $+(%,version.check,.,$address) $chan
}
}
on *:ctcpreply:version*:{
if $($+(%,version.check,.,$address),2) {
if !$hget(vercheck) { hmake vercheck 10 }
filter -c CTCP.txt CTCP.txt ?*
if $filtered { hdel -w vercheck * | hload -n vercheck CTCP.txt }
if $hfind(vercheck,$strip($2-),1,R).data { ban -k $($+(%,version.check,.,$address),2) $nick 2 14Bad Script Detected }
halt
}
}
#CTCTREPLY end