egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Colour stripper

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
Maz.b
Voice


Joined: 13 Dec 2013
Posts: 2
Location: The Netherlands

PostPosted: Fri Dec 13, 2013 8:16 am    Post subject: Colour stripper Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Dec 13, 2013 9:09 am    Post subject: Reply with quote

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
View user's profile Send private message
Maz.b
Voice


Joined: 13 Dec 2013
Posts: 2
Location: The Netherlands

PostPosted: Fri Dec 13, 2013 9:19 am    Post subject: Reply with quote

Heey Thanks! It is working! <3333
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber