| View previous topic :: View next topic |
| Author |
Message |
traxx Voice
Joined: 03 Jan 2006 Posts: 11
|
Posted: Thu Jan 26, 2006 11:38 am Post subject: Read 1st line in a txt and set topic |
|
|
Hi folks,
i wonder if somebody could help me realizing the follwing:
I want the bot to read the 1st line of test.txt every 24 hours and then set this 1st line as topic.
Could anyone please help me?
Thanks, traxx |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Jan 26, 2006 1:37 pm Post subject: |
|
|
| Code: | set topicfile "scripts/topics.txt"
bind time - "00 00 *" set:topic
proc set:topic args {
set topic [read -nonewline [set f [open $::topicfile]]][close $f]
puthelp "topic #yourchannel :$topic"
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
traxx Voice
Joined: 03 Jan 2006 Posts: 11
|
Posted: Thu Jan 26, 2006 2:11 pm Post subject: |
|
|
| thanks a lot! |
|
| Back to top |
|
 |
|