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.

$text help

Help for those learning Tcl or writing their own scripts.
Post Reply
B
Branden
Halfop
Posts: 61
Joined: Sat Aug 04, 2007 8:36 pm

$text help

Post by Branden »

Hi there,


Ok. So I know how to use $text but my problem is I want it to use a word on a line.

Ex:

Chatter: Please join #channel Scrappy

I would want the bot to join the 3rd word in the phrase.


What varible do I use for this?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

set third [lindex [split $text] 2]
B
BoaR
Halfop
Posts: 48
Joined: Fri Jul 20, 2007 1:36 am

Post by BoaR »

check if the word has # in front.

Code: Select all

[regexp {#.+?} $chan]
Post Reply