| View previous topic :: View next topic |
| Author |
Message |
kris Voice

Joined: 12 Sep 2006 Posts: 14 Location: Perth, Australia
|
Posted: Sun Nov 05, 2006 12:07 pm Post subject: List Text in a file [Solved] |
|
|
| Code: |
bind msg "-|-" married msg_married
proc msg_married { nick userhost handle text } {
set file "marriage.role"
set found 0
set fs [open $file r]
while {![eof $fs]} {
gets $fs line
putquick "NOTICE $nick :$line and $line"
}
close $fs
}
|
i want it to come out as: e.g:
kris and NoMansLand
test and test1
The database is setup as
nick1
nick2
nick3
nick4
any help is greatly appreciated thanks!!
Last edited by kris on Sun Nov 05, 2006 10:55 pm; edited 1 time in total |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sun Nov 05, 2006 2:04 pm Post subject: |
|
|
| You already started a topic about this not too long ago. |
|
| Back to top |
|
 |
kris Voice

Joined: 12 Sep 2006 Posts: 14 Location: Perth, Australia
|
Posted: Sun Nov 05, 2006 10:51 pm Post subject: |
|
|
no the last one was deleting text from a file. this one isnt this is making it loop and list all the nicks in the file, because im designing a e-Marriage service.
and one of my admins had said, why dont we do this. and i started doing it, and it doesnt remove the text, just lists it. completely different.
- edit -
dont worry, heres the code for later reference when people need help with the same thing.
| Code: |
bind msg "-|-" married msg_married
proc msg_married { nick userhost handle text } {
set file "marriage.role"
set found 0
set fs [open $file r]
while {![eof $fs]} {
gets $fs line
gets $fs lne
putquick "NOTICE $nick :$lne and $line"
}
close $fs
}
|
thanks, metroid _________________ KrisDC Eggdrop Services - 2006 |
|
| Back to top |
|
 |
|