| View previous topic :: View next topic |
| Author |
Message |
monie089 Halfop
Joined: 29 Jul 2006 Posts: 76
|
Posted: Sat Sep 30, 2006 1:46 pm Post subject: How would I make my bot read a certian topic from a file |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Sep 30, 2006 2:04 pm Post subject: |
|
|
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 |
|
 |
monie089 Halfop
Joined: 29 Jul 2006 Posts: 76
|
Posted: Sat Sep 30, 2006 3:44 pm Post subject: |
|
|
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 |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sat Sep 30, 2006 5:32 pm Post subject: |
|
|
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 |
|
 |
|