I am well aware of that but since /*line commands don't work and /filter doesnt allow normal windows as the outfile we need to dump it to a file sadly.
Code:
alias rline.ex { 
  ;$1 = chan, $2 = line, $3- = new text
  window -h @chantowin
  filter -wwz $1 @chantowin *
  rline @chantowin $2-
  filter -wfcz @chantowin $scriptdirtmp.txt *
  loadbuf -r $1 $scriptdirtmp.txt
  .remove $scriptdirtmp.txt
  window -c @chantowin
}

However /savebuf doesn't save the line colour so for instance by default the topic is green in mIRC's default theme this green colour can't be saved.
So we have to echo all the line back in ourselves which is NOT a cool thing to do.

Code:
alias rline.ex { 
  ;$1 = chan, $2 = line, $3- = new text
  window -h @chantowin
  filter -wwz $1 @chantowin *
  rline @chantowin $2-
  var %t = $line(@chantowin,0), %c = 1
  clear $1
  while (%c <= %t) { 
    echo $line(@chantowin,%c).color $1 $line(@chantowin,%c)
    inc %c
  }
  window -c @chantowin
}

/rline.ex [CHAN] [N] [TEXT]
This will replace a line with what you want whilst preserving line colours

obviously this will become slower and slower as the buffer gets bigger.

We need /filter supporting #windows as outfile's or loadbuf prefixing lines with there line colour code.

Last edited by Mpdreamz; 11/03/07 01:45 PM.