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.

Reguest script that chnage everyday

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
sk-4
Halfop
Posts: 51
Joined: Sat Oct 06, 2007 6:37 am

Reguest script that chnage everyday

Post by sk-4 »

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Try the Tcl archive.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
s
sk-4
Halfop
Posts: 51
Joined: Sat Oct 06, 2007 6:37 am

Post by sk-4 »

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..
M
Maiki
Voice
Posts: 28
Joined: Sun May 20, 2007 4:58 pm

Post by Maiki »

Code: Select all

# 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"
}
s
sk-4
Halfop
Posts: 51
Joined: Sat Oct 06, 2007 6:37 am

Post by sk-4 »

Code: Select all

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)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Check tcl-commands.doc (ctime <unixtime>).
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply