| View previous topic :: View next topic |
| Author |
Message |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Mon Nov 24, 2008 10:06 am Post subject: Strip color/bold code |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Nov 24, 2008 10:17 am Post subject: |
|
|
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 |
|
 |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Tue Dec 09, 2008 3:01 pm Post subject: |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Dec 09, 2008 5:07 pm Post subject: |
|
|
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 |
|
 |
intel Halfop
Joined: 26 Feb 2008 Posts: 57
|
Posted: Tue Dec 09, 2008 5:20 pm Post subject: |
|
|
| I tried with and without the spaces and neither work. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Dec 09, 2008 10:03 pm Post subject: |
|
|
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 |
|
 |
|