egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

$text help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Mon Aug 06, 2007 6:37 pm    Post subject: $text help Reply with quote

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?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Aug 06, 2007 7:10 pm    Post subject: Reply with quote

Code:
set third [lindex [split $text] 2]

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
BoaR
Halfop


Joined: 20 Jul 2007
Posts: 48

PostPosted: Mon Aug 06, 2007 10:41 pm    Post subject: Reply with quote

check if the word has # in front.

Code:
[regexp {#.+?} $chan]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber