|
Joined: Jan 2006
Posts: 468
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2006
Posts: 468 |
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,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
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,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
[HH:nn:ss ($ticks)]
[$uptime(mirc,2)]
What's not to get?
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
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.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
Hoopy frood
Joined: Nov 2004
Posts: 842 |
In the theme of timestamps, I'd like colors in timestamps to stay after you've closed/started mIRC.
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Jan 2006
Posts: 468
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2006
Posts: 468 |
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,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
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.
|
|
|
|
Joined: Dec 2007
Posts: 48
Ameglian cow
|
Ameglian cow
Joined: Dec 2007
Posts: 48 |
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,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
/timestamp -f [HH:nn] < $+ $nick $+ > $1- And then we dont even need on text events
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Jan 2006
Posts: 468
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2006
Posts: 468 |
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
...for "themed" output of incoming text (I assume)
|
|
|
|
Joined: Dec 2007
Posts: 48
Ameglian cow
|
Ameglian cow
Joined: Dec 2007
Posts: 48 |
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
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.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Jan 2006
Posts: 468
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2006
Posts: 468 |
Nobody asked for some new identified to be added, it was about allowing scripted identifiers to be used.
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,063 |
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.
If it ain't broken, don't fix it!
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
You should probably re-read my post, the suggestion was whilst on-topic.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
|