TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

#format time

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
All0i5hu5



Joined: 04 Jan 2009
Posts: 13

PostPosted: Tue Feb 17, 2009 12:32 pm    Post subject: #format time Reply with quote

I noticed this change a few versions ago:

Changed the %t #format option to use a strftime format to create time stamps.

I used

#FORMAT {time} {%t}
#LINE {log} {yomomma.txt} {$time}

to timestamp when i opened a file with tail so I can keep a running log of tells on a given day.

Now when I do that... the numeral 0 gets written to the log.

If I:
#FORMAT {time} {%t}
#ECHO $time

I get #SYNTAX: #format {variable} {format} {arguments}.

Any ideas? Or how do I need to make this work now preferrably?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3274

PostPosted: Tue Feb 17, 2009 2:22 pm    Post subject: Reply with quote

You need to use the strftime format, see man strftime. The following should work:

Code:

#alias {logline}
{
        #format time {%t} {{%Y-%m-%d %H:%M:%S}}
        #line log mylog.txt {<178>$time \};
        #line log mylog.txt %0
}

#act {%0 tells you '%1'} {logline}
Back to top
View user's profile Send private message Send e-mail
moebius



Joined: 27 Jan 2005
Posts: 96

PostPosted: Tue Feb 17, 2009 7:15 pm    Post subject: Reply with quote

Why not make make it backwards compatible by using the old format by default if no format is specified for %t?
_________________
StrangeMUD - strangemud.net:9332
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3274

PostPosted: Tue Feb 17, 2009 8:32 pm    Post subject: Reply with quote

I'm trying to avoid feature bloat at all cost.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group