|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
I'm try to turn this into a multiserver type thing, but don't know where to start i have on 1:CONNECT:{ set %tmp.signon $ctime } and on 1:DISCONNECT:{ { echo -s disconnected from $server | iecho -s signon time : $asctime(%tmp.signon,ddd mmm d HH:nn:ss yyyy) | iecho -s signoff time : $asctime($ctime,ddd mmm d HH:nn:ss yyyy) | iecho -s total ontime : $replace($dur($calc($ctime - %tmp.signon)),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s) | unset %tmp* } | haltdef } it's supposed to look like disconnected from irc.blah.com signon time : Tue Jul 20 17:19:57 2004 signoff time : Tue Jul 20 17:19:58 2004 total ontime : 1s but if i connect to other servers after and disconnect from another or, both or however many i'm on at the time, all the stats are wrong ie; disconnected from irc.blah2.net signon time : signoff time : Tue Jul 20 17:19:42 2004 total ontime : 1802w 5d 16h 19m 42s any help would be great.
|
|
|
|
Joined: Dec 2002
Posts: 787
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 787 |
I've not looked for any bugs/ect in the coding so i'll take it, that it works just wanting it to be multiserver, to do so, try changing variables to the following:
from: %tmp.signon
to: $+(%,tmp.signon.,$server)
as a result your variables will be called %tmpsignon.myserver.com
so for every server theres a different variable, you can then call the variable back using $eval($+(%,tmp.signon.,$server)) or something alike.
|
|
|
|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
Ok i understand all that and seems correct, but when i call it back , the whole var appears %tmp.signon.irc.blah.comTue Jul 20 19:34:02 2004
|
|
|
|
Joined: Dec 2002
Posts: 787
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 787 |
Sorry for the delayed reply, didnt see your reply; On *:Connect:{ set $+(%,tmp.signon.,$server) $ctime }
There is also no such thing as $dur and /iecho wont work when not connected, so you cant use that, see this: on 1:DISCONNECT:{ var %t = $server echo -s disconnected from %t echo -s signon time : $asctime($eval($+(%,tmp.signon.,%t),2),ddd mmm d HH:nn:ss yyyy) echo -s signoff time : $asctime($ctime,ddd mmm d HH:nn:ss yyyy) echo -s total ontime : $replace($duration($calc($ctime - $eval($+(%,tmp.signon.,%t),2))),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s) }
Eamonn.
|
|
|
|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
all working now, thanks $dur and iecho are my own aliases btw :tongue:
|
|
|
|
Iori
|
Iori
|
You could shorten this $replace($dur($calc($ctime - %tmp.signon)),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s) To this $remove($dur($calc($ctime - %tmp.signon)),ks,k,ays,ay,rs,r,ins,in,ecs,ec)
|
|
|
|
|