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.

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

Help for those learning Tcl or writing their own scripts.
Post Reply
m
monie089
Halfop
Posts: 76
Joined: Sat Jul 29, 2006 11:13 pm

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

Post by monie089 »

Like I wanted to do

Code: Select all

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
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
m
monie089
Halfop
Posts: 76
Joined: Sat Jul 29, 2006 11:13 pm

Post by monie089 »

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
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
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.
Post Reply