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.
Old posts that have not been replied to for several years.
-
mrdr
- Halfop
- Posts: 42
- Joined: Thu Jun 16, 2005 2:20 pm
- Location: Lithuania / Vilnius / Underground
-
Contact:
Post
by mrdr »
Code: Select all
set zenklas "!"
set onlinelaikas [expr [unixtime] - ${server-online}]
bind pub -|- ${zenklas}online online:laix
proc online:laix {nick hand uhost chan arg} {
global {server-online}
set onlinelaikas [expr [unixtime] - ${server-online}]
putquick "PRIVMSG $chan :Online @ IRC: $onlinelaikas"
}
Can anyone make this script show not seconds but weeks, days, hours, seconds?
ex: 3d 6h 26m 6s
-
demond
- Revered One
- Posts: 3073
- Joined: Sat Jun 12, 2004 9:58 am
- Location: San Francisco, CA
-
Contact:
Post
by demond »
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
Replace
Code: Select all
set onlinelaikas [expr [unixtime] - ${server-online}]
with
Code: Select all
set onlinelaikas [duration [expr [unixtime] - ${server-online}]]
$onlinelaikas will now return "?? days ?? hours ?? minutes ?? seconds"
Edit: demond was faster

-
mrdr
- Halfop
- Posts: 42
- Joined: Thu Jun 16, 2005 2:20 pm
- Location: Lithuania / Vilnius / Underground
-
Contact:
Post
by mrdr »
Thanks, works. :}
