| View previous topic :: View next topic |
| Author |
Message |
fauves Voice
Joined: 09 Apr 2006 Posts: 11
|
Posted: Sun Apr 09, 2006 2:49 pm Post subject: TCL flood (help) |
|
|
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: | 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  |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Apr 10, 2006 4:12 am Post subject: |
|
|
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 [code] tag when posting logs, code |
|
| Back to top |
|
 |
fauves Voice
Joined: 09 Apr 2006 Posts: 11
|
Posted: Mon Apr 10, 2006 6:10 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Apr 10, 2006 11:56 am Post subject: |
|
|
*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 [code] tag when posting logs, code |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon Apr 10, 2006 12:51 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Apr 12, 2006 3:08 am Post subject: |
|
|
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 [code] tag when posting logs, code |
|
| Back to top |
|
 |
|