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.
Help for those learning Tcl or writing their own scripts.
monie089
Halfop
Posts: 76 Joined: Sat Jul 29, 2006 11:13 pm
Post
by monie089 » Sat Sep 30, 2006 1:46 pm
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
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Sat Sep 30, 2006 2:04 pm
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
monie089
Halfop
Posts: 76 Joined: Sat Jul 29, 2006 11:13 pm
Post
by monie089 » Sat Sep 30, 2006 3:44 pm
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
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sat Sep 30, 2006 5:32 pm
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.