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.

Timed Message

Old posts that have not been replied to for several years.
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

hi again - that's not working for me - just wondering if it worked for you?

have copied/pasted into the TCL what you wrote - and put my channel in there, but no luck so far...

=\
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Really? It looks like it will work, although I haven't tested it. Try adding putlog statements to see where it's going wrong. Put one right after the global timemsg part says putlog "testing $hour:$min in [array names timemsg]" and one inside the 'if' statement saying putlog "inside the if" or something.
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

hi - thanks for that - I'm getting an invalid command error - theres a rouge symbol somewhere!

also, the script is trying to post a message every minute instead of only the times specified - so another problem there...
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Along with that, there is normaly information, on what the invalid command was.

What editor did you use?

How did you upload it?

What mode did you upload it in. Binary or ascii?
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

its a symbol that looks like an A - but a sweedish version...

editied it with KWrite on Mandrake Linux

didn't upload - it runs off a local machine here...
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Well clearly there's no swedish A in my script, so you either made a typo or your editor saved in utf-8 mode. Try doing it again in a different editor (vi/vim is good).
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

hi st - just wondering if you could double-check this for me - it is sending a msg to the channel, but it's doing it every minute rather than every hour.
I have changed the mesages and times for a different message each hour, but it just cycles through them every minute...thanks

set timemsg(01:00) "some message for 1am"
set timemsg(03:15) "some message for 3:15am"
set timemsg(15:00) "some message for 3pm... etc..."

bind time - "* * * * *" timed_message
proc timed_message {min hour day month year} {
global timemsg
if {[info exists timemsg($hour:$min)]} {
putserv "privmsg #sheep :$timemsg($hour:$min)"
}
return 0
}
Locked