mIRC Homepage
Posted By: RPGGamer [mIRC 7.43] - Line Marker breaks formatting - 10/11/15 03:25 AM
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.
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?
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)
  }
}
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?
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()
© mIRC Discussion Forums