egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TCL flood (help)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
fauves
Voice


Joined: 09 Apr 2006
Posts: 11

PostPosted: Sun Apr 09, 2006 2:49 pm    Post subject: TCL flood (help) Reply with quote

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 Smile
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Apr 10, 2006 4:12 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
fauves
Voice


Joined: 09 Apr 2006
Posts: 11

PostPosted: Mon Apr 10, 2006 6:10 am    Post subject: Reply with quote

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 Sad
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Apr 10, 2006 11:56 am    Post subject: Reply with quote

*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
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Mon Apr 10, 2006 12:51 pm    Post subject: Reply with quote

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. Rolling Eyes
</ironic>
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Apr 12, 2006 3:08 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber