Quote:
Is there any feature to move the buffer to the actual log (unless part and rejoin)? It's very annoying as I use to automatically update channel statistics with mircstats which generates the stats from the logfile, which means I have to perform this ritual (part-rejoin) every time I want to update my stats page.

Also.. If there isn't, I would suggest a feature for moving the buffer into the actual log or an option to disable buffering.

Thanks, JJS3.


This seems to work, but I am not sure of how safe/reliable it is:

Code:
alias flushlog {

  if ($1) {
    var %flush.active = $1
  }
  else {
    var %flush.active = $active
  }

  var %flush.path.1 = $window(%flush.active).logfile
  var %flush.path.target = $gettok($nopath(%flush.path.1), 1, 46)

  var %flush.path.2 = $mklogfn(%flush.path.target)

  var %flush.color = $color(Info Text)

  var %flush.isfile.1 = $isfile(%flush.path.1)
  var %flush.isfile.2 = $isfile(%flush.path.2)

  if ((%flush.isfile.1 == $true) && $&
    (%flush.isfile.2 == $true)) {

    .copy -a $+(", %flush.path.1, ") $&
      $+(", %flush.path.2), ")

    write -c $+(", %flush.path.1, ")

  }

  if ((%flush.isfile.1 == $false) && $&
    (%flush.isfile.2 == $false)) {
    echo %flush.color -ae * /flushlog: file not found
  }
  else {
    echo %flush.color -ae * Flushed log: %flush.active
  }
}


Code:
alias viewlog {

  if ($1) {
    var %view.active = $1
  }

  else {
    var %view.active = $active
  }

  var %view.path.1 = $window(%view.active).logfile
  var %view.path.target = $gettok($nopath(%view.path.1), 1, 46)

  var %view.path.2 = $mklogfn(%view.path.target)

  var %view.isfile.1 = $isfile(%view.path.1)
  var %view.isfile.2 = $isfile(%view.path.2)

  if (%view.isfile.2 != $true) {
    if (%view.isfile.1 == $true) {

      flushlog %view.active

      run $+(", %view.path.1, ")

    }
    else {
      echo $color(Info Text) -ae * /viewlog: file not found
    }
  }
  else {

    flushlog %view.active

    run $+(", %view.path.2, ")

  }
}