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.

Remove color from bind

Help for those learning Tcl or writing their own scripts.
Post Reply
_
_El_Chojin_
Voice
Posts: 2
Joined: Thu Jun 25, 2009 8:33 pm

Remove color from bind

Post by _El_Chojin_ »

Hi to all:
I'm trying to make a script that catch a word from a channel (with bind command) and make something., the problem is that when that word is said with a color i don't know how to remove the colour.

For example i have:

Code: Select all

bind pub - MYWORD prword

proc prword {nick uhost hand chan arg} {
   Here i make things
}
The script works if i write:
MYWORD hello world

But if i write:
MYWORD hello world
Dont work, how can i do to make this work?

Thanks.
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

You need to use pubm bind.
For example:

Code: Select all

bind pubm - "*word*" prword
proc prword {nick uhost hand chan arg} {
putserv "PRIVMSG $chan :$nick says $arg on $chan."
}
To remove colors use stripcodes command:

Code: Select all

bind pubm - "*word*" prword
proc prword {nick uhost hand chan arg} {
putserv "PRIVMSG $chan :$nick says [stripcodes c "$arg"] on $chan."
}
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
_
_El_Chojin_
Voice
Posts: 2
Joined: Thu Jun 25, 2009 8:33 pm

Post by _El_Chojin_ »

Thanks, worked prefect :D
Post Reply