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 

Auto Rehash

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
ORATEGOD
Voice


Joined: 08 Jun 2020
Posts: 34

PostPosted: Mon Feb 20, 2023 11:51 pm    Post subject: Auto Rehash Reply with quote

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
View user's profile Send private message AIM Address
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 826
Location: Tennessee, USA

PostPosted: Mon Feb 20, 2023 11:58 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 289
Location: /dev/null

PostPosted: Tue May 02, 2023 12:02 pm    Post subject: Reply with quote

I thing you neeed
Code:
utimer


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
View user's profile Send private message MSN Messenger
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1108
Location: France

PostPosted: Tue May 02, 2023 1:03 pm    Post subject: Reply with quote

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
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 -> Script Requests 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