This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

tcl to kill bottler and irc-ork

Old posts that have not been replied to for several years.
L
Life.A.Deth

tcl to kill bottler and irc-ork

Post by Life.A.Deth »

anyone put together a tcl to kill bottler and irc-orc scripts on irc??

would hafto be a onjoin scanner that did a version request..
apon version matching "blah.blah"
kick said nick on said channel with ban msg blahblah



I would script it if I could...but i dontknow tcl...

any help or anyone know of one already out?

Thanks,
Life After Death
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

check this one...

Code: Select all

set banscripts {
"put here the version reply you want to be banned"
"here another version too...."
}

bind join - "*" join_check
bind ctcr - VERSION ban_scripts

proc join_check {nick host hand chan} {
putserv "PRIVMSG $nick :\001VERSION\001"
return
}

proc ban_scripts {nick host handle dest keyword args} {
 set args [lindex $args 0]
set reply [lindex $args 0]
foreach script $::banscripts {
if {$reply == $script} {
set mask "*!*@[lindex [split $uhost @] 1]"
newban $mask BadScript "\0021 hour\002 ban for \002using lame scripts\002 within \002$chan\002 " 60
}
}
}
«A fantastic spaghetti is a spaghetti that does not exist»
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Instead of

Code: Select all

if {$reply == $script} {
you should use

Code: Select all

if {[string match -nocase $script $reply]} {
Once the game is over, the king and the pawn go back in the same box.
L
Life.A.Deth

Post by Life.A.Deth »

Thanks for the reply realz,

the script works fine and dandy to detect the set variables. But it cant ban anything

this is the error when it tries to ban
Tcl error [ban_scripts]: can't read "uhost": no such variable

maby setting a diff type of ban mask will work??

let me insert ceasers adition also see how that works
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

replace from:

Code: Select all

set mask "*!*@[lindex [split $uhost @] 1]" 
to:

Code: Select all

set mask "*!*@[lindex [split $host @] 1]" 
Once the game is over, the king and the pawn go back in the same box.
L
Life.A.Deth

Post by Life.A.Deth »

Excellent!!! it works well. Last thing is no ban message.

line
newban $mask BadScript "\0021 hour\002 ban for \002using lame scripts\002 within \002$chan\002 " 60

Tcl error [ban_scripts]: can't read "chan": no such variable

which is ok for me . I dont need such fancy ban message. I tried to change to

newban $mask BadScript "IRC-Ork/Bottler Banned" 60

That did not work.

Thanks for all your help guys!!
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

you can use

Code: Select all

$::chan instead of $chan
, or you can just remove the chan variable as you dont need it :P
«A fantastic spaghetti is a spaghetti that does not exist»
s
skubee

Post by skubee »

hey you got a finalized version of that script?
S
SmokeyOne
Halfop
Posts: 69
Joined: Tue Jan 14, 2003 6:04 am

Post by SmokeyOne »

@skubee

if you follow thier posts and with the code fixes you can put together your own "finialzed script" i think it would look something like this

set banscripts {
"put here the version reply you want to be banned"
"here another version too...."
}

bind join - "*" join_check
bind ctcr - VERSION ban_scripts

proc join_check {nick host hand chan} {
putserv "PRIVMSG $nick :\001VERSION\001"
return
}

proc ban_scripts {nick host handle dest keyword args} {
set args [lindex $args 0]
set reply [lindex $args 0]
foreach script $::banscripts {
if {[string match -nocase $script $reply]} {
set mask "*!*@[lindex [split $host @] 1]"
newban $mask BadScript "\0021 hour\002 ban for \002using lame scripts\002 within \002$::chan\002 " 60
}
}
}

if I pasted all of ceasar's fixes along with ReaLz code correctly

enjoy
f
foobar
Voice
Posts: 10
Joined: Tue Sep 16, 2003 4:52 pm

Post by foobar »

"put here the version reply you want to be banned"
"here another version too...."

can i use wildcards for the above settings?
like: "Bottler*"
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Yes. Give it a try.
Once the game is over, the king and the pawn go back in the same box.
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

Life.A.Deth : irc-ork is able to change the ctcp version reply, and you can find keygens everywhere (no leechers, you dont get links in here)

so you wont be protected, maybe there is an other way to show if a client is an irc-ork (default channel list, etc)
f
foobar
Voice
Posts: 10
Joined: Tue Sep 16, 2003 4:52 pm

Post by foobar »

I tried "Bottler*" but no luck it must be exact :(
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

proc ban_scripts {nick host handle dest keyword args} {
this should be

Code: Select all

proc ban_scripts {nick host handle dest keyword arg} {
and change
set args [lindex $args 0]
set reply [lindex $args 0]
to

Code: Select all

set reply [lrange [split $arg] 0 end]
I guess this should do it.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Sir_Fz wrote:
proc ban_scripts {nick host handle dest keyword args} {
this should be

Code: Select all

proc ban_scripts {nick host handle dest keyword arg} {
and change
set args [lindex $args 0]
set reply [lindex $args 0]
to

Code: Select all

set reply [lrange [split $arg] 0 end]
I guess this should do it.
lrange returns a list, i'm fairly sure you want reply to be a string.
As such, usage of 'join' will be needed.
Locked