home *** CD-ROM | disk | FTP | other *** search
- # This script simply checks for and grabs the address of any nickname and
- # mails them a file using Mail. It is configurable for other mailers.
- # Jake [WinterHawk] Khuon, 25 Nov 93
- # Special thanks to CyberMage for netcheck and the basis for mailfile
- #
- # Usage: /MAILFILE <nick> <file> [<subject>]
-
-
- # This checks for and gets the LUSER's address
- alias netcheck
- {
- userhost $0
- wait
- if (userhost)
- {
- @ function_return = 1
- }
- {
- whowas $0
- wait
- if (userhost)
- {
- @ function_return = 1
- }
- {
- @ function_return = 0
- }
- }
- }
-
- # Mails the file
- alias mailfile
- {
- if ([$0])
- {
- @ idctr = 1
- if (netcheck($0))
- {
- if (rmatch($userhost ~%@%))
- {
- echo [MAIL] >>> MAILING $1 TO <$nick!$strip(~ $userhost)> WITH Sub
- ject: $2- <<<
- # Change the following line to accept your favorite mailer. Default is Mail.
- exec Mail -s "$2-" $strip(~ $userhost) < $1
- restore
- }
- }
- {
- echo [NETCHECK] >>> <$0> IS NOT CURRENTLY ON THE NET <<<
- restore
- }
- }
- }
-