I wonder if it's possible to make a script that will search text file and retrive information from it. Something like this:
<nick> !Search format
<bot> you can format your hard drive with "format c:"
<nick> !search how to format
<bot> you can format your hard drive with "format c:"
i mean.. bot searches through all lines in a text files than retrieves all lines that match the word that has been searched. If anyone have a sample of this post it in here pls
The function you seek can be found within a wide variety of already written tcl's that can be found in the tcl archives. Look under "quote scripts"...there are so many, like fluxlearn.tcl, learn.tcl, cufs.tcl......
Here is a small piece of code to help to get you started. Although you might have to manipulate it alot add lists and arrays to get it working for multiple words and search formats. (You can add multiple response detecting patterns if you like too)
Note: The database doesn't use files here.
(You would have to modify that to if you want to read from a file search a specific match pattern and then display the line)