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.
Old posts that have not been replied to for several years.
-
r
rvwinkle
Post
by rvwinkle »
Can someone help me finish this code by advising on where/how to add the
"close $emaile" line ?
Code: Select all
1 set emaile "/www/botread.txt"
2 set cmd "!email"
3 set bwhere 0
4
5 bind pub -|- $cmd email
6 proc email {nick handle host chan text } {
7 global emaile bwhere
8 set botread [open $emaile r]
9 while { ! [eof $botread] } {
10 set outline [gets $botread]
11 if {!$bwhere} {
12 putserv "PRIVMSG $chan :\002$outline\002"
13 }
14 }
15 }
-
greenbear
- Owner
- Posts: 733
- Joined: Mon Sep 24, 2001 8:00 pm
- Location: Norway
Post
by greenbear »
add it after it's done reading the file
Code: Select all
set emaile "/www/botread.txt"
set cmd "!email"
set bwhere 0
bind pub -|- $cmd email
proc email {nick handle host chan text } {
global emaile bwhere
set botread [open $emaile r]
while {![eof $botread]} {
set outline [gets $botread]
if {!$bwhere} {
putserv "PRIVMSG $chan :\002$outline\002"
}
}
close $botread
}
Last edited by
greenbear on Tue Jun 22, 2004 7:00 pm, edited 1 time in total.
-
Papillon
- Owner
- Posts: 724
- Joined: Fri Feb 15, 2002 8:00 pm
- Location: *.no
Post
by Papillon »
errrr
don't you mean
instead of close, or

Elen sila lúmenn' omentielvo
-
greenbear
- Owner
- Posts: 733
- Joined: Mon Sep 24, 2001 8:00 pm
- Location: Norway
Post
by greenbear »
darn i did it again .. gotta stop replying before reading thru the whole thing