| View previous topic :: View next topic |
| Author |
Message |
davidc1857 Voice
Joined: 12 Feb 2007 Posts: 1
|
Posted: Mon Feb 12, 2007 12:51 am Post subject: Need to strip color and underline codes out of log files |
|
|
I'm basically trying to use eggdrop for nothing more than creating good readable logs for a IRC channel.
I've got it working the way I want, except that a lot of people use colors and such and those codes show up in the log as control characters, etc.
Is there an easy way to strip those out?
Thanks,
David Chamberlian |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Feb 12, 2007 11:39 pm Post subject: |
|
|
You'll have to make a little custom script/proc for logging things, and then pass the input through the [stripcodes] function:
| Quote: |
stripcodes <strip-flags> <string>
Description: strips specified control characters from the string given.
strip-flags can be any combination of the following:
b - remove all boldface codes
c - remove all color codes
r - remove all reverse video codes
u - remove all underline codes
a - remove all ANSI codes
g - remove all ctrl-g (bell) codes
Returns: the stripped string.
Module: core
|
|
|
| Back to top |
|
 |
|