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 

How would I make my bot read a certian topic from a file

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


Joined: 29 Jul 2006
Posts: 76

PostPosted: Sat Sep 30, 2006 1:46 pm    Post subject: How would I make my bot read a certian topic from a file Reply with quote

Like I wanted to do

Code:

bind pub - @help help

proc help {nick uhost hand chan text} {
set help [string trim $text] {
"" { putserv "PRIVMSG $nick :blah"
}
}

could I do that I'am not exactly sure how to do it and what format would i use for the file.
_________________
New server irc.NintendoXG.com come and visit
Back to top
View user's profile Send private message Send e-mail
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Sep 30, 2006 2:04 pm    Post subject: Reply with quote

Could you try to explain, in words, what you try to accomplish?
That piece of code does'nt make any sense at all...
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
monie089
Halfop


Joined: 29 Jul 2006
Posts: 76

PostPosted: Sat Sep 30, 2006 3:44 pm    Post subject: Reply with quote

Ok im trying to make a Help script but it will gather the info from a .txt file.
What I want to know is how to make it search the File or and msg that line with the info?
_________________
New server irc.NintendoXG.com come and visit
Back to top
View user's profile Send private message Send e-mail
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Sat Sep 30, 2006 5:32 pm    Post subject: Reply with quote

Simple. Open the file and read line by line then check if the first word is what you where looking for then dump in to the channel what that line has. Example of storing in file.
Quote:

something Bla bla bla
foo Something else
.. and so on..

Check the Basic File Operations for starters.
_________________
Once the game is over, the king and the pawn go back in the same box.
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