View previous topic :: View next topic |
Author |
Message |
ORATEGOD Voice
Joined: 08 Jun 2020 Posts: 34
|
Posted: Mon Feb 20, 2023 11:51 pm Post subject: Auto Rehash |
|
|
Code: | proc rehash { } {
global chanlist
foreach channel [array names chanlist] {
putquick "PRIVMSG $channel :Ejecutando Rehash Automatico"
}
rehash
}
settimer rehash 3600 rehash |
I found this TCL but I can't get it to work, I hope someone can help me.
Thank you so much ! |
|
Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 826 Location: Tennessee, USA
|
Posted: Mon Feb 20, 2023 11:58 pm Post subject: |
|
|
My first thought is that you are replacing the built in Eggdrop rehash command with one of your own that no longer rehashes the bot at all:)
...and settimer is not an eggdrop tcl command I'm aware of. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 289 Location: /dev/null
|
Posted: Tue May 02, 2023 12:02 pm Post subject: |
|
|
I thing you neeed
Code: | utimer <seconds> <tcl-command> [count [timerName]]
Description: executes the given Tcl command after a certain number of seconds have passed. If count is specified, the command will be executed count times with the given interval in between. If you specify a count of 0, the utimer will repeat until it’s removed with killutimer or until the bot is restarted. If timerName is specified, it will become the unique identifier for the timer. If timerName is not specified, Eggdrop will assign a timerName in the format of “timer<integer>”.
Returns: a timerName
Module: core |
_________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1108 Location: France
|
Posted: Tue May 02, 2023 1:03 pm Post subject: |
|
|
Don't touch the rehash native function, bind the pre-rehash
Code: | bind evnt - prerehash nrehash
proc nrehash {type} {
foreach channel [array names chanlist] {
putquick "PRIVMSG $channel :Ejecutando Rehash Automatico"
}
}
utimer 3600 rehash 0 |
_________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
|