home *** CD-ROM | disk | FTP | other *** search
- # register - register a service with the directory
- #
- # 9-July-92 weber@eitech.com created
- #
- proc register {switches envelope inputs} {
- if {[getfield $inputs TYPE] == "multipart"} {
- set parts [getfield $inputs PARTS]
- return [register $switches $envelope \
- [lindex $parts [expr [llength $parts] - 1]]]
- } {
- set fid [open [glob "~/archive/directory"] a]
- puts $fid "--+"
- puts $fid [format "Administrator: %s\n" [getfield $envelope REPLYTO]]
- set gid [open [getfield $inputs FILE] r]
- puts $fid [read $gid]
- close $fid
- close $gid
- setfield response STRING "Thanks for registering your service."
- return [mailout [turnaround $envelope] $response]
- }
- }
-