This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
starpossen
Op
Posts: 139 Joined: Tue Jan 10, 2006 1:08 am
Post
by starpossen » Tue Mar 28, 2006 2:44 pm
What I wish for, is a script that let's you add an auto rehash and/or auto restart, like this, I would set the timer to 24Hours and the the bot would rehash and make a channel message about it, would this be possible?
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Tue Mar 28, 2006 4:17 pm
Code: Select all
set rchan "#yourchannelname"
timer 720 make_a_rehash
proc make_a_rehash {} {
rehash
putquick "PRIVMSG $rchan :Scripts are rehashed..."
timer 720 make_a_rehash
}
if {[timerexists make_a_rehash]!=""} { killtimer [timerexists make_a_rehash] }
timer 720 make_a_rehash
If you wish a restart, replace rehash with restart
Best regards
starpossen
Op
Posts: 139 Joined: Tue Jan 10, 2006 1:08 am
Post
by starpossen » Tue Mar 28, 2006 5:20 pm
Thanks alot, by the way, the 720 that's in minuttes right? sorry me asking but it's getting late here hehe..
*EDIT*
I can see it's rehashing but im getting this error when watching in dcc chat:
Code: Select all
[23:18] Rehashing...
[23:18] Tcl error in script for 'timer14':
[23:18] can't read "rchan": no such variable
It wont message the channel.
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Tue Mar 28, 2006 6:59 pm
Yes... 720 is in Minutes = 12h - You should replace it with 1440
EDIT:
Code: Select all
set rchan "#yourchannelname"
timer 720 make_a_rehash
proc make_a_rehash {} {
rehash
putquick "PRIVMSG $::rchan :Scripts are rehashed..."
timer 720 make_a_rehash
}
if {[timerexists make_a_rehash]!=""} { killtimer [timerexists make_a_rehash] }
timer 720 make_a_rehash
Best regards
starpossen
Op
Posts: 139 Joined: Tue Jan 10, 2006 1:08 am
Post
by starpossen » Tue Mar 28, 2006 7:11 pm
That did the trick, thanks again, hwo would I be able to use it in 2 channels?
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Tue Mar 28, 2006 7:18 pm
Set a Second Channel
Code: Select all
set rchan "#yourchannelname"
set secondchan "#secondchannelname"
timer 720 make_a_rehash
proc make_a_rehash {} {
rehash
putquick "PRIVMSG $::rchan :Scripts are rehashed..."
putquick "PRIVMSG $::secondchan :Scripts are rehashed..."
timer 720 make_a_rehash
}
if {[timerexists make_a_rehash]!=""} { killtimer [timerexists make_a_rehash] }
timer 720 make_a_rehash
starpossen
Op
Posts: 139 Joined: Tue Jan 10, 2006 1:08 am
Post
by starpossen » Tue Mar 28, 2006 7:28 pm
And thank you once again, I will continue reading them doc's etc.
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Tue Mar 28, 2006 8:06 pm
or
Code: Select all
set rchan "#yourchannelname,#secondchannelname"
if IRC server supports/allows it
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...
starpossen
Op
Posts: 139 Joined: Tue Jan 10, 2006 1:08 am
Post
by starpossen » Tue Mar 28, 2006 8:36 pm
Both ways works, thanks to you both.
/me goes back to studying scripting.
starpossen
Op
Posts: 139 Joined: Tue Jan 10, 2006 1:08 am
Post
by starpossen » Tue Apr 04, 2006 2:23 am
Hmm.. I dont know why, but i repeats it self:
Code: Select all
[07:54:01] <%RadioBot> Rehashing makes me feel soo good...
[08:04:01] <%RadioBot> Rehashing makes me feel soo good...
[08:04:01] <%RadioBot> Rehashing makes me feel soo good...
I Tested it with 10minuttes as interval, but hmm what could cause this?
halloaizq
Voice
Posts: 24 Joined: Mon Aug 27, 2007 5:01 am
Contact:
Post
by halloaizq » Mon Dec 03, 2007 3:02 am
if i set like this ..
timer 5 make_a_rehash <-- rehash for every 5 minutes ..
this msg will appear in eggy but did not advertise in channel ..
Tcl error in script for 'timer247006':
can't read "rchan": no such variable <-- channel set already
but eggy still rehash for every 5 minutes ..
: halloaizq :
BrewMaster
Voice
Posts: 34 Joined: Sat Jul 07, 2007 8:26 am
Post
by BrewMaster » Tue Dec 18, 2007 11:10 pm
If I wanted to modify this script so that only the channel ops see the msg about the rehash would i do it like this?
Code: Select all
putquick "PRIVMSG @$::rchan :Scripts are rehashed..."
nice script!!
Thanks,
brew
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Dec 19, 2007 9:35 am
Code: Select all
foreach n [chanlist $::rchan] {
if {[isop $n $::rchan]} {
puthelp "PRIVMSG $n :Scripts are rehashed..."
}
}