This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Colour stripper

General support and discussion of Eggdrop bots.
Post Reply
M
Maz.b
Voice
Posts: 2
Joined: Fri Dec 13, 2013 8:08 am
Location: The Netherlands
Contact:

Colour stripper

Post by Maz.b »

I have a colour stripper for a eggdrop, it does a goodjob but it doesn't strip all the colours.

Code: Select all

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?
User avatar
caesar
Mint Rubber
Posts: 3777
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

instead of

Code: Select all

set a [stripcodes abcgru $a] 
try user's strip color regsub:

Code: Select all

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.
M
Maz.b
Voice
Posts: 2
Joined: Fri Dec 13, 2013 8:08 am
Location: The Netherlands
Contact:

Post by Maz.b »

Heey Thanks! It is working! <3333
Post Reply