PDA

View Full Version : AutoRehasher [Eggdrop]


wooolF[RM]
11-29-2003, 09:06 AM
Mmmm...

IDEA : make eggdrop rehash every 1 hour or so (should use a variable that can be defined in the settings of the TCL)

WHY : Windrop sux :rolleyes: and needs to be rehashed from time to time (on some systems at least, let's not start arguing that "my windrop was working nicely w/o rehash in past 23 years" ok? thnx).

HOW : should be made as TCL script with timer that will call some procedure every x seconds and then trigger rehash proc.

Anyone up to it? :)

ADDiCT
11-29-2003, 09:30 AM
isn't a rehash only needed when u change one or more scripts ?

wooolF[RM]
11-29-2003, 09:33 AM
the answer is yes, but sometimes windrop gets all dizzy or just laggy cause of netsplits or so so u have to rehash it manually... (then it works again, prooved here)...

so autorehasher would do the job :)

neXus
11-29-2003, 10:31 AM
--- rs.tcl ---

set mins 60

timer $mins prs
proc prs { } { timer $mins prs; rehash }


/e: yeah all looking .. no one is answer

MadFred
11-30-2003, 08:10 AM
so i just make a rs.tcl and put the code in there and add 'source scripts/rs.tcl' to eggie.conf and it should do it ? :)

neXus
11-30-2003, 08:12 AM
right

MadFred
11-30-2003, 10:31 AM
[15:23] Tcl error in script for 'timer5':
[15:23] can't read "mins": no such variable

got that after 60min

MaistroX
11-30-2003, 10:38 AM
I get that to in my bot ->

"
[15:19] <_BARBIE_> [15:19] Tcl error in script for 'timer65555':
[15:19] <_BARBIE_> [15:19] can't read "mins": no such variable
"

what to do ?

bounty
11-30-2003, 11:21 AM
Originally posted by neXus & fixed by bounty ;)
--- rs.tcl ---


set mins 60

proc prs { } {
global mins
timer $mins prs
rehash
}

timer $mins prs



have fun
bounty

MadFred
11-30-2003, 01:07 PM
works fine, thx :)

wooolF[RM]
11-30-2003, 02:19 PM
wasn't able to test it before today, now I got back and will test it, I see someone got it to work allready :) thanx guys for your afforts :)

Best Regards

neXus
11-30-2003, 03:21 PM
ahh shit .. forgott global .. thanx bounty :cool:

St0rm
12-01-2003, 03:50 PM
It works, kinda, when an hour has passed, it keeps rehashing for a full minute, then stops, etc. So it works, but it would be better if it rehashes 1 time every hour :)

MadFred
12-01-2003, 04:11 PM
ah thats so true, rehashing for a minute hehe

neXus
12-01-2003, 11:22 PM
-- rs.tcl --

set mins 60

proc prs { } { rehash }

timer $mins prs

hehe .. set timers 2 times on each rehash
tested with 1 minute.

wooolF[RM]
12-02-2003, 07:47 PM
I'm not quite following... how will the final script look like? :rolleyes: :p

neXus
12-02-2003, 09:25 PM
my last post should be the final script :banana:

wooolF[RM]
12-05-2003, 07:36 AM
Thanx neXus :)

biboun
02-23-2004, 02:56 AM
I test your script and I have many prob with timer.

I test for new script.

domy3
03-27-2005, 07:18 PM
So which is the good one?

:(