| View previous topic :: View next topic |
| Author |
Message |
Maz.b Voice
Joined: 13 Dec 2013 Posts: 2 Location: The Netherlands
|
Posted: Fri Dec 13, 2013 8:16 am Post subject: Colour stripper |
|
|
I have a colour stripper for a eggdrop, it does a goodjob but it doesn't strip all the colours.
| Code: | catch {unbind raw - PRIVMSG *raw:irc:msg}
catch {unbind raw - PRIVMSG *raw:PRIVMSG}
bind raw - PRIVMSG striprivmsg
proc striprivmsg {f k a} {
set a [stripcodes abcgru $a]
*raw:irc:msg $f $k $a
*raw:PRIVMSG $f $k $a
}
putlog "colourstripper... Loaded" |
How can I add more colours to strip? |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Dec 13, 2013 9:09 am Post subject: |
|
|
instead of
| Code: |
set a [stripcodes abcgru $a]
|
try user's strip color regsub:
| Code: |
regsub -all {\002|\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\026|\037} $a {} a
|
_________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
Maz.b Voice
Joined: 13 Dec 2013 Posts: 2 Location: The Netherlands
|
Posted: Fri Dec 13, 2013 9:19 am Post subject: |
|
|
| Heey Thanks! It is working! <3333 |
|
| Back to top |
|
 |
|