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.
Help for those learning Tcl or writing their own scripts.
_El_Chojin_
Voice
Posts: 2 Joined: Thu Jun 25, 2009 8:33 pm
Post
by _El_Chojin_ » Thu Jun 25, 2009 8:39 pm
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.
username
Op
Posts: 196 Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:
Post
by username » Fri Jun 26, 2009 12:44 am
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."
}