|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Any reason why it wont kick something like this? /\Black_Inviter_v1.01/\ By: henry /\
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
}
}
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
It seems to work for me, maybe you aren't putting the version replies in the CTCP correctly?
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
What do you mean? show me exemple please!!
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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:*:{
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
because in my dialogs i use check/uncheck box to turn on/off
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
I didn't mean put your dialogs in a group, I meant your CTCP portion, like this..
#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
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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 }
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
if ($group(#CTCP) == on) { did -c $dname 41 }
if ($did(41).state == 1) { .enable #CTCP } else { .disable #CTCP }
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
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 }
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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
|
|
|
|
|