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 flood (help)

Help for those learning Tcl or writing their own scripts.
Post Reply
f
fauves
Voice
Posts: 11
Joined: Sun Apr 09, 2006 2:35 pm

TCL flood (help)

Post by fauves »

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 :)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

 tag when posting logs, code
f
fauves
Voice
Posts: 11
Joined: Sun Apr 09, 2006 2:35 pm

Post by fauves »

xchannel can't help me, becouse i need:

:arrow: 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 :(
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

*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: Select all

 tag when posting logs, code
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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. :roll:
</ironic>
Once the game is over, the king and the pawn go back in the same box.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

 tag when posting logs, code
Post Reply