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.

whats wrong with this script???

Old posts that have not been replied to for several years.
Locked
m
matt2kjones
Voice
Posts: 24
Joined: Fri Feb 07, 2003 11:16 am

whats wrong with this script???

Post by matt2kjones »

hi someone gave me this script which is suppose display random messages in a channel. Well i load it and it doesn't seem to work

is there anything wrong with it :

set rand(chan) "#thedigitaldream"

set rand(msges) {
"Message to display in channel"
}

bind time - "5 * * * *" rand:msges

proc rand:msges {min hour day month year} {
global rand
putserv "PRIVMSG $rand(chan) :[lindex $rand(msges) [rand [llength $rand(msges)]]]"
}

is that correct?
http://www.thedigitaldream.co.uk
irc.thedigitaldream.co.uk #thedigitaldream
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

The problem is "5 * * * *". The args for the time bind are 2 digits each, so change it to "05 * * * *" and it should work. Note this only prints messages once an hour, is that what you want?
m
matt2kjones
Voice
Posts: 24
Joined: Fri Feb 07, 2003 11:16 am

Post by matt2kjones »

if i type 05, wont it do it every 5 mins???

or does that mean 05 past the hour???

every hour is fine anyway :)

thanx for ur help
http://www.thedigitaldream.co.uk
irc.thedigitaldream.co.uk #thedigitaldream
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

*sigh*

Post by De Kus »

command formating i can only suggest to RTFM! (in this case tcl-commands.doc, page 32 line 26)
but bind time is rarely used, usually they use the timer command to itself again like: timer 5 [list rand:msges]
but only recommed for other intervales than hourly ^^.
Locked