Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
rebeldev
Beginner


Joined: 12 Mar 2003
Posts: 14

PostPosted: Sun Oct 12, 2003 12:00 am   

timestamping
 
I was wondering if there was some way to timestamp certain events in a mud. For example the OOC channel, IC channel, IMM channel's etc...

An example of one of my channels that I'd like to be timestamped:
[Imp] Gilean: well, we'll be there in a bit

I'd like it to read:
(14:45) [Imp] Gilean: well, we'll be there in a bit

where the time in ()'s is in 24hour format.

Any help on this scripting matter would be greatly appreciated.
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Sun Oct 12, 2003 12:23 am   
 
something like this

see help for %time

#TR {~[Imp~](*)$} {#sub ~(%time( "hh:mm")~) ~[Imp~]{%1}}
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Oct 12, 2003 3:22 am   
 
Also referencing the help for #SUB you will find that it supports 2 parameters. Default behavior when no delimeter is provided is to take the first word as the first parameter and everything else as the second. The corrected trigger would be:
#TR {~[Imp~](*)$} {#sub {~(%time( "hh:mm")~) ~[Imp~]{%1}}}

Without the addition of the braces to indicate that it is all one parameter you would end up with odd triggers being created.
Reply with quote
rebeldev
Beginner


Joined: 12 Mar 2003
Posts: 14

PostPosted: Mon Oct 13, 2003 5:26 am   
 
thank you both so much, this indeed did what I wanted it to. :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net