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.

Strip color/bold code

General support and discussion of Eggdrop bots.
Post Reply
i
intel
Halfop
Posts: 57
Joined: Tue Feb 26, 2008 11:51 pm

Strip color/bold code

Post by intel »

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.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

This topic is pretty much covered in this thread.
Last edited by nml375 on Tue Dec 09, 2008 5:00 pm, edited 1 time in total.
NML_375
i
intel
Halfop
Posts: 57
Joined: Tue Feb 26, 2008 11:51 pm

Post by intel »

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?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
i
intel
Halfop
Posts: 57
Joined: Tue Feb 26, 2008 11:51 pm

Post by intel »

I tried with and without the spaces and neither work.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
Post Reply