mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2006
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Nov 2006
Posts: 6
For all lines following the Line Marker in a window, the $line identifier returns stripped text. However, for lines above the Line Marker, the $line identifier returns all formatting correctly.

This bug happens regardless of whether the Line Marker is hidden or visible.

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Thanks for your bug report. I have not been able to reproduce this issue here so far. Can you provide a step by step method that reproduces this issue for you?

Joined: Nov 2006
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Nov 2006
Posts: 6
I was somewhat mistaken. It seems the bug is unrelated to the line marker.

It appears the formatting actually breaks after the channel backlogs have been loaded. Any line from that point on will be stripped of formatting when returned by the $line identifier.

Here's the code I am using which generates this issue:

Code:
alias WinLineTest {
  if (!$1) { var %TargetWindow $active }
  else {
    if (!$window($1)) { echo -a Window $1 does not exist. | halt }
    elseif ($window($1).type == custom) { echo -a Window $1 is a custom window! | halt }
    else { var %TargetWindow $1 }
  }
  if (!$window($+(@,%TargetWindow))) { window -e3l18 $+(@,%TargetWindow) }
  var %i 0
  while (%i <= $line(%TargetWindow,0)) {
    inc %i
    if (!$line(%TargetWindow,%i)) { continue }
    aline -p $+(@,%TargetWindow) $line(%TargetWindow,%i)
  }
}

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Thanks, I have tested this again and if the mIRC, Options, IRC, Logging settings are set to include line colors and not trip codes, they appear as expected when reloaded with your script. Are you sure that the log files are being saved with line colors and without the strip codes option enabled?

Joined: Nov 2006
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Nov 2006
Posts: 6
I have the following settings enabled in IRC > logging:
Code:
Automatic log and reload (all buttons ticked)
Lock log files
Line Colours
Include Network
Timestamp logs: [dd/mm/yy HH:nn:ss]

All other settings in this section are unchecked.

My logs are saved correctly with line colours and the reload logs option is working as it should be. $line() also returns correctly the logs that the reload logs options buffered into the window. It's only the subsequent lines which have been generated during the current session that $line() has an issue with.

Interestingly, $line().color manages to identify the formatting and correctly returns the starting colour number of any of these subsequent lines, despite the fact the starting colour has been stripped out of these subsequent lines when returned by $line()


Link Copied to Clipboard