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.

other way then dumpfile ??

Old posts that have not been replied to for several years.
Locked
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

other way then dumpfile ??

Post by Ofloo »

hmm is there an other way then dumpfile of reading a txt file and dumping that to the user who triggers the command cause dumpfile only works if the data is in text directroy and euhm the txt files are on various places so ... :/
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Re: other way then dumpfile ??

Post by egghead »

Ofloo wrote:hmm is there an other way then dumpfile of reading a txt file and dumping that to the user who triggers the command cause dumpfile only works if the data is in text directroy and euhm the txt files are on various places so ... :/
1. read the specified file (not necessarily from the text/help directory)
2. split it into a list around the newline character
3. output each element of that list in een PRIVMSG $nick
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

have no clue what ur talking about and tnx anyway but it suddenly popped in my head today ;) hehe i know took a while and the answer was there all the time in front of me but for the peope who wana use it here it is ;)

Code: Select all

bind pub - !log log:pub

proc log:pub {nick uhost hand chan arg} {
  set rfile [open "test.txt" "r"]
  foreach line [split [read $rfile] \n] {
    putquick "NOTICE $nick :$line" 
  }
  close $rfile
}
XplaiN but think of me as stupid
Locked