|
symphony
|
symphony
|
I was wondering if it would be a good idea to support Custom Identifiers in timestamps (both with /timestamp -f and the logging timpstamping).
Custom identifiers will provide features usual timestamping has so you know...
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
Would you kindly provide an example of what you mean? Maybe I'm just tired, but I'm having a hard time picturing how this would be useful.
|
|
|
|
Joined: Oct 2003
Posts: 3,641
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,641 |
[HH:nn:ss ($ticks)]
[$uptime(mirc,2)]
What's not to get?
|
|
|
|
Joined: Dec 2002
Posts: 2,884
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,884 |
I think a popular use would be to allow the timestamp to only display if it has changed since the last message. For instance I often see scripted themes use timestamps which will display something like: 12:51am <joe> hi <mary> hi joe <joe> what's up? 12:52am <mary> not much, you? Using a custom identifier it could be as simple as alias mytimestamp {
if (%last_ts == $asctime(hh:nntt)) return
else {
%last_ts = $asctime(hh:nntt)
return $asctime(hh:nntt) $+ $crlf
}
} That would be assuming that $crlf worked as a newline, but anyway, I'm guessing this is the kind of thing people would use it for.
|
|
|
|
Joined: Nov 2004
Posts: 822
Hoopy frood
|
Hoopy frood
Joined: Nov 2004
Posts: 822 |
In the theme of timestamps, I'd like colors in timestamps to stay after you've closed/started mIRC.
|
|
|
|
symphony
|
symphony
|
like to be able to use $mytimestamp as the timestamp value /timestamp -f $mytimestamp
I KNOW it can be scripted in custom theming, but I think it would be better if implemented as an existing feature. make sense?
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
I understand now what you're looking for, and I agree that this could be a good feature.. as I said, I was tired earlier.
|
|
|
|
Kol
|
Kol
|
I also like the idea. Sounds useful for those who want to further customize their timestamp. I made a handy little snippet that uses a timer on START to find the exact time each second starts in $ticks. Some basic subtraction, and voila! You can have milliseconds in your timestamp on *:START: {
unset %t
.timer $asctime($calc($ctime +60),HH:nn) 1 0 msget 1 $!+ $!right($ticks,3)
}
alias -l msf return $right(0000 $+ $left($1,$2),$2)
alias msget {
if (!$isid) set %t $1
else {
var %c 1 $+ $right($ticks,3)
var %c $calc(%c -%t)
if (%c < 0) { var %c $calc(1000- $abs(%c)) }
return $replacecs($asctime($1),xxx,$msf(%c,3),xx,$msf(%c,2),x,$msf(%c,1))
}
} It probably has an accuracy deficiency of +-10ms but in timestamps, that's not much. If we could use identifiers in timestamps, you'd be able to do /timestamp -f [HH:nn:ss $msget(xxx) $+ ]
|
|
|
|
Joined: Oct 2003
Posts: 3,641
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,641 |
/timestamp -f [HH:nn] < $+ $nick $+ > $1- And then we dont even need on text events 
|
|
|
|
Joined: Nov 2006
Posts: 1,552
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,552 |
...for "themed" output of incoming text (I assume) 
|
|
|
|
Joined: Oct 2003
Posts: 3,641
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,641 |
A little of both, really..
Makes you wonder if maybe the whole theming method should be rethought by adding things like, say, $nickstampfmt, $linefmt that can customize output without the need of text events.
|
|
|
|
symphony
|
symphony
|
Nobody asked for some new identified to be added, it was about allowing scripted identifiers to be used.
|
|
|
|
Joined: Jan 2003
Posts: 1,057
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,057 |
In the theme of timestamps, I'd like colors in timestamps to stay after you've closed/started mIRC. this is also due to a limitation in ini files because of windows I believe... but yeah it would be nicer if the colours would stay and you don't have to do a /timestamp in ON START (which is the workaround for this problem) having timestamp support identifiers would certainly be a nice addition and I can see it's uses.
|
|
|
|
Joined: Oct 2003
Posts: 3,641
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,641 |
You should probably re-read my post, the suggestion was whilst on-topic.
|
|
|
|
|