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.
Help for those learning Tcl or writing their own scripts.
fauves
Voice
Posts: 11 Joined: Sun Apr 09, 2006 2:35 pm
Post
by fauves » Sun Apr 09, 2006 2:49 pm
Hello,
I have this tcl, but i want:
-when ppl say "badwords" (the eggdrop put kickban, only when user say "badwords" 3 or more times )
example:
* fauves play ...
* fauves on ...
* fauves 0n ...
#eggdrop put kickban
* fauves asdsasad ...
* fauves asdsadsd ...
* fauves sdfsdfdfs ...
#eggdrop don't put kickban
Code: Select all
set count 3
set seconds 30
set allow ""
set channels "#SCP"
set badwords {
"*play*"
"on*"
"0n*"
"*ouvir*"
"*ouve"
}
bind ctcp - ACTION floodprot
proc floodprot { nick uhost hand chan key arg } {
global botnick livesaver actionflood allow channels seconds count badwords
if {$nick == $botnick} {return 0}
if {[lsearch -exact $channels $chan] == -1} {return 0}
if {[isop $nick $chan]} {return 0}
lappend livesaver($uhost:$chan) 1
utimer $seconds "expire livesaver($uhost:$chan)"
if {[llength $livesaver($uhost:$chan)] >= $count} {
putserv "KICK $chan $nick :You cannot use more than $count /me in $seconds secs"
}
}
proc expire var_exp {
upvar $var_exp var_pointer
if {[llength $var_pointer] > 1} {
set var_pointer [lrange $var_pointer 1 end]
} else {
unset var_pointer
}
}
Please help me , thanks very much
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Mon Apr 10, 2006 4:12 am
one properly implemented script that does what you want is
xchannel
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use
fauves
Voice
Posts: 11 Joined: Sun Apr 09, 2006 2:35 pm
Post
by fauves » Mon Apr 10, 2006 6:10 am
xchannel can't help me, becouse i need:
when ppl say "badwords" (the eggdrop put kickban, only when user say "badwords" 3 or more times );
and the xchannel.tcl haven't this comand
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Mon Apr 10, 2006 11:56 am
*sigh*
you people want your exact "command" for everything - it doesn't work this way - you read and try to comprehend the manual first, and only then decide whether the thing would work for you or not
had you bothered to read & understand the script's doc header, you'd know that xchannel allows you to define specific actions for each consequent offense - so you can use warnings for 1st & 2nd and kick/ban for 3rd (maybe I should add no action as separate entity)
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Mon Apr 10, 2006 12:51 pm
You should be ashame demond, how do you dare and hope he will ever bother reading your commens, or any other comment in any other script.
</ironic>
Once the game is over, the king and the pawn go back in the same box.
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Wed Apr 12, 2006 3:08 am
well actually your point is valid... that's why I learned Tcl and wrote the scripts I needed - I was (and still am) too lazy to research other peoples' scripts
connection, sharing, dcc problems? click
<here>
before asking for scripting help, read
<this>
use