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 

Strip color/bold code

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


Joined: 26 Feb 2008
Posts: 57

PostPosted: Mon Nov 24, 2008 10:06 am    Post subject: Strip color/bold code Reply with quote

I have a tcl script that responds to NEW in from a bot but I need it to work regardless of what color (and bold) the bot is announcing that in.
bind pub -|- NEW in ms:newdir
would I do bind pub -|- $strip New in:newdir

What do I need to do to get it to work? I think the $strip but have no idea what the whole thing looks like or where it should go.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Nov 24, 2008 10:17 am    Post subject: Reply with quote

This topic is pretty much covered in this thread.
_________________
NML_375, idling at #eggdrop@IrcNET


Last edited by nml375 on Tue Dec 09, 2008 5:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
intel
Halfop


Joined: 26 Feb 2008
Posts: 57

PostPosted: Tue Dec 09, 2008 3:01 pm    Post subject: Reply with quote

That code doesnt work for me.
I have
bind pub -|- "/002 /00310NEW" ms:newdir
bind pub -|- "/002 /0010NEW" ms:newdir

proc ms:newdir {nick uhost hand chan arg} {
putlog "we are in the proc"

obviously not the whole code but I NEVER see we are in the proc from the partyline of the bot.

So is it because the NEW is in bold and color?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Dec 09, 2008 5:07 pm    Post subject: Reply with quote

Did you intentionally put a space between the \002 and the \003 control codes?

Keep in mind that only the first word will become the command word with pub bindings, so there can be no spaces whatsoever within the command argument. It must also exactly match (apart from upper-/lower-case) the first word letter by letter (including control codes).
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
intel
Halfop


Joined: 26 Feb 2008
Posts: 57

PostPosted: Tue Dec 09, 2008 5:20 pm    Post subject: Reply with quote

I tried with and without the spaces and neither work.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Dec 09, 2008 10:03 pm    Post subject: Reply with quote

Then you are not exactly, character by character, matching your command with what is written (including the order of bold, color, etc) in the channel.

Of course, if you are using something like suggested in the thread I linked, no control codes should be included whatsoever...
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
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