mIRC Home    About    Download    Register    News    Help

Print Thread
#203633 22/08/08 05:28 PM
L
Lindrian
Lindrian
L
Alright.
I have my custom made logviewer, which loads a specefic log file into a @window, nothing special. Im using /loadbuf -p @window file.

However, if I use this for example:
Code:
/echo 4 -at Hello 3hey test


It echos "hello" in red, "hey" in green and "test" in red.

But in the log file it looks like this:
Quote:
0402(121902:122602:120502) Hello 3hey test

(The long messy stuff after the first color is my timestamp)
This will echo my timestamp like normal, but "hello" is in white, "hey" in green and "test" in white aswell. Is there a way to make the logging work with the colors just like mirc does?

Im not sure if this should be a bug report or a feature request, however, feel free to move it if needed.

Last edited by Lindrian; 22/08/08 05:29 PM.
S
symphony
symphony
S
What are your logging settings? How your timestamp in your logging settings look like? I never had such problem before though.

Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
well considering how the log file is read in a text editor, ud have to make the text editor read the chars like mirc does(thus enabling the colors)

Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
Originally Posted By: foshizzle
well considering how the log file is read in a text editor, ud have to make the text editor read the chars like mirc does(thus enabling the colors)

Are you getting dumber?

Joined: Mar 2003
Posts: 611
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 611
ROFLMAO laugh


billythekid
L
Lindrian
Lindrian
L
Here's my logging settings: http://i34.tinypic.com/24fwm4w.jpg

S
symphony
symphony
S
lol @ Collective.

@Lindrian. I believe its your timestamp settings in anyway.

Joined: Apr 2004
Posts: 700
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 700
There are two obstacles in getting what you want to work. The second is the lack of support in /loadbuf for setting the line color based on the color in each log line (this could also be added as part of the -z switch to /filter). That would be a very valid feature suggestion.

For that, though, another obstacle needs to be fixed first, and I believe that this can in fact be considered a bug: namely, that the line color storage in the log file is ambiguous. As the helpfile states, the line color is only stored if it differs from the original color. This means that:

Code:
/echo 4 -a hi
and:
Code:
/echo -a <ctrl+k>04hi


are stored exactly the same way in the log file, namely as "<ctrl+k>04hi", even though they are different with respect to subsequent ctrl+o's or single ctrl+k's as your example shows.

As a result, there is currently no way to reliably decide for a line in a log file, whether this log line includes a line color or not. Even when it is known that "Line colors" was turned on in the options at the time of logging.

This could be fixed by altering mIRC's logging mechanism, to always include the line color prefix, i.e. even if the line color is actually the default color, if the first character on the line is a ctrl+k. That would remove the ambiguity during log parsing.

For now, you're basically out of luck. There just isn't enough information in the logfile to do this right, so there are no workarounds either. For your specific case you could make a workaround (involving /filter -k and seeing if a line starts with two color codes), but it would be slow and only work with your logs with the colored timestamps..


Saturn, QuakeNet staff
L
Lindrian
Lindrian
L
I see, thanks for the reply. Hopefully khaled will see this and 'fix' it. a -z switch for the /loadbuf would be perfect!

L
Lindrian
Lindrian
L
darn, was hoping for a response by someone on the "team", to tell if its a bug or not, and if there'll be a 'fix' for it.

As I said earlier, a -z switch similar to /filter would be really really good!

Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
I believe Sat pointed out that ths problem here is not due to a bug, just a limitation of how log files work, maybe a design flaw, depending on your point of view. So really, there's nothing to fix, just more features to add. It's important to point out, though, that /filter -z is not the "feature to add", here, so your request isn't going to happen until mIRC's logging mechanism undergoes the improvement Sat described above.

Joined: Mar 2006
Posts: 392
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 392
If you were to make "on text" do something like this:

echo $color(text) $chan (CTRL+K) $+ $color(text) < $+ $nick $+ > $1-

wouldnt it work?


[02:16] * Titanic has quit IRC (Excess Flood)
L
Lindrian
Lindrian
L
Originally Posted By: The_JD
If you were to make "on text" do something like this:

echo $color(text) $chan (CTRL+K) $+ $color(text) < $+ $nick $+ > $1-

wouldnt it work?
What? I didn't quite understand...

R
RRX
RRX
R
Originally Posted By: Lindrian
Originally Posted By: The_JD
If you were to make "on text" do something like this:

echo $color(text) $chan (CTRL+K) $+ $color(text) < $+ $nick $+ > $1-

wouldnt it work?
What? I didn't quite understand...

If you understood what Sat said, why don't you understand what The_JD said? That is making sure there is always a color code.

Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
'cause it's supposed to be a log viewer, not a logging script itself, I assume...


Link Copied to Clipboard