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.
Old posts that have not been replied to for several years.
L
Life.A.Deth
Post
by Life.A.Deth » Sun Jun 15, 2003 12:44 am
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
ReaLz
Op
Posts: 121 Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece
Post
by ReaLz » Sun Jun 15, 2003 1:19 am
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»
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sun Jun 15, 2003 2:54 am
Instead of
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 » Sun Jun 15, 2003 9:37 am
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
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sun Jun 15, 2003 9:46 am
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 » Sun Jun 15, 2003 10:16 am
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!!
ReaLz
Op
Posts: 121 Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece
Post
by ReaLz » Mon Jun 16, 2003 2:26 am
you can use
, or you can just remove the chan variable as you dont need it
«A fantastic spaghetti is a spaghetti that does not exist»
s
skubee
Post
by skubee » Mon Jul 07, 2003 2:49 am
hey you got a finalized version of that script?
SmokeyOne
Halfop
Posts: 69 Joined: Tue Jan 14, 2003 6:04 am
Post
by SmokeyOne » Tue Jul 08, 2003 4:19 am
@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
foobar
Voice
Posts: 10 Joined: Tue Sep 16, 2003 4:52 pm
Post
by foobar » Tue Sep 16, 2003 5:20 pm
"put here the version reply you want to be banned"
"here another version too...."
can i use wildcards for the above settings?
like: "Bottler*"
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Wed Sep 17, 2003 12:06 am
Yes. Give it a try.
Once the game is over, the king and the pawn go back in the same box.
GodOfSuicide
Master
Posts: 463 Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria
Post
by GodOfSuicide » Wed Sep 17, 2003 11:59 am
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)
foobar
Voice
Posts: 10 Joined: Tue Sep 16, 2003 4:52 pm
Post
by foobar » Wed Sep 17, 2003 4:19 pm
I tried "Bottler*" but no luck it must be exact
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Sep 17, 2003 4:59 pm
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.
strikelight
Owner
Posts: 708 Joined: Mon Oct 07, 2002 10:39 am
Contact:
Post
by strikelight » Wed Sep 17, 2003 9:32 pm
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.