mIRC Homepage
Posted By: Datsund mIRC Log Code Stripper - 20/05/05 05:37 PM
I hope somebody can help me.

I recently downloaded a statistics program (mircstats), which analyzes mIRC logs, and outputs various statistics onto a html page. This software requires all logs to be stripped of code, however the older logs I have for the channel in question contain code.

Can anybody tell me of a good way to strip older logs of code? I would really like to add my older logs to the new ones, so that previous chat can be included in the statistics.

I have tried searching google for 'Code stripper for mIRC' and others, but no luck so far.

Thankyou.
Posted By: landonsandor Re: mIRC Log Code Stripper - 20/05/05 05:55 PM
I remember doing something like this ages ago with a custom window, $strip, $read and some other things to output the log intact but void of all formatting. I dont remember the exact coding, but that should give you an idea how to script one if that's what you'd like to do
Posted By: Riamus2 Re: mIRC Log Code Stripper - 20/05/05 05:56 PM
You could try something like this:

Code:
alias removecode {
  if ($1 && $2) {
    set %cnt 1
    while (%cnt <= $lines($1)) {
      write $2 $strip($read($1,%cnt))
      inc %cnt
    }
  }
  unset %cnt
}


Usage:

/removecode logfilename.txt newfilename.txt

Note: If you have spaces in the filename or the path (if used), then put quotes around the filenames/paths.

Example:

/removecode "c:\program files\mirc\logs\log1.txt" "c:\program files\mirc\logs\newlog1.txt"

or

/removecode "logs\my log.txt" "logs\my new log.txt"
Posted By: BarGarth Re: mIRC Log Code Stripper - 20/05/05 06:44 PM
Try filter...

Code:
  
/filter -bcff filename.log filename.log
© mIRC Discussion Forums