Here's what you asked for. This script will run everytime someone sends your bot a message with !test as it's first word. Remember that if whatever follows the number is made up of multiple words, the second method presented is useless.
bind msg - !test test
proc test {nick uhost hand chan text} {
# Now we've got to extract the first word from the
# text variable and put it into our number variable.
# This is the most commonly used approach:
set text [split $text]
set number [lindex $text 0]
set text [lrange $text 1 end]
# However, if the text following the number does
# not contain further words, an alternative one-liner
# would be as following:
foreach {number text} [split $text] { break }
}
Yes you can set the ignore for 24hrs. See the 'newignore' command in tcl-commands.doc and change the ignore time as you wish.
As, 1hr = 60 mins
24hrs = 24x60mins = 1440mins
Then you will need to set 1440 to make it 24hrs.
As for the 5 times yes you can set that too.
See the 'flood-msg' variable in the .conf file.
The format of this is:
NUMBER_OF_LINES:SECONDS
Example: '5:3'
Meaning if, 5 lines of text are sent by a single host to the bot in less than 3 seconds then the bot will ignore that user for the defined amount of time set.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
awyeah wrote:You have to give it a test to see that out.
Personally I think the eggdrops internal settings are more better and faster than tcl scripts as they are coded in C, which makes them more effective!
problem is if you completely ignore the user for 24 hours he can't trigger other binds
I think the requestor wanted to allow a user to use a command only 5 times every 24 hours, not completely ignore the user after the user issues any msg to the bot 5 times