| View previous topic :: View next topic |
| Author |
Message |
sk-4 Halfop
Joined: 06 Oct 2007 Posts: 51
|
Posted: Fri Dec 28, 2007 7:56 pm Post subject: Reguest script that chnage everyday |
|
|
Hi,i would like to knw how to make bot chnage topic everyday by itself maybe after 12am.it chnage topic.. i would like to make bot put its standart description + server Uptime
ex:day1 bot change topic to ->welcome to channel (server Uptime 300 days)
ex:day2 bot change topic to ->welcome to channel (server uptime 301 days)
the reason is i wanna try to make server uptime counter in topic.. hope somebody can help me |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Jan 03, 2008 5:51 pm Post subject: |
|
|
Try the Tcl archive. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
sk-4 Halfop
Joined: 06 Oct 2007 Posts: 51
|
Posted: Wed Jan 09, 2008 7:51 am Post subject: |
|
|
i tried the egghelp but i dont find any script that can change topic every 24hr
cause wat i reguest for is i wanna add the script and make the bot change topic according my server uptime
ex:day 1 --> Topic is welcome to channel ..server uptime 300days
ex:day 2 --> Topic is welcome to channel ..server uptime 301days
ex:day 2 --> Topic is welcome to channel ..server uptime 302days
i just need to add extra the uptime into topic and make bot refresh it every 24hr or bot get the info from shell
anyone can help me.. |
|
| Back to top |
|
 |
Maiki Voice
Joined: 20 May 2007 Posts: 28
|
Posted: Sun Jan 13, 2008 7:39 am Post subject: |
|
|
| Code: | # Set channel here
set chan "#g"
bind time - "12 00 * * *" proc:spit
proc spit {} {
global chan
if {[llength $chan] < "1"} { putlog "Didn't set channel."; return }
if {[catch {exec uptime} uptime]} { set uptime "Uptime is unavailable." }
putmsg $chan "Welcome to $chan. Server uptime $uptime"
} |
|
|
| Back to top |
|
 |
sk-4 Halfop
Joined: 06 Oct 2007 Posts: 51
|
Posted: Tue Jan 15, 2008 7:59 pm Post subject: |
|
|
| Code: | timer 58 topic:reset
proc topic:reset {} {
putserv "TOPIC #channel # welcome to channel uptime $::uptime
} |
when i use that $::uptime i getting time in unix
bot changes topic to Welcome to channel uptime 1199980766
how to convert that to days ex.(300days) |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Jan 15, 2008 9:14 pm Post subject: |
|
|
Check tcl-commands.doc (ctime <unixtime>). _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
|