| View previous topic :: View next topic |
| Author |
Message |
shnt Voice
Joined: 15 Nov 2007 Posts: 3
|
Posted: Thu Nov 15, 2007 5:35 am Post subject: Get topic from file. |
|
|
I need to get one string from file every 60-120 minutes and if it is not empty, then set it as topic on #channel. My file will always contain only one dynamic string with fixed lenght (or +- 2 chars).
Can anyone help me with such script? |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Thu Nov 15, 2007 7:32 am Post subject: |
|
|
This should update the topic every hour:
| Code: | bind time - 00* updateTopic
proc updateTopic args {
set f [open yourtopicfile.txt]
set topic [gets $f]
close $f
if {$topic!=""} {
puthelp "TOPIC #yourchan :$topic"
}
} |
(Not tested. (Remember to change "yourtopicfile.txt" and "#yourchan" to suit your needs)) _________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
|