Network Utilities (#44)

Utilities for dealing with network connections
Creating & tracking hosts:

:open(host, port [, connect-connection-to]) => connection
open a network connection (using open_network_connection).
If 'connect-connection-to' is a player object, the
connection will be connected to that object when it
gets the first line of input.

closes the connection & cleans up data

Parsing network things:

return "" or string saying why 'email' is invalid.
uses .valid_email_regexp

return "" or string saying why 'host' doesn't look
like a valid internet host name

returns the 'important' part of a host name, e.g. =>

Sending mail

:sendmail(to, subject, @lines)
send mail to the email address 'to' with indicated subject.
header fields like 'from', 'date', etc. are filled in.
lines can start with additional header lines.

:raw_sendmail(to, @lines)
used by :sendmail. Send mail to given user at host, just
as specified, no error checking.


.active If 0, disabled sending of mail.

.site Where does this MOO run?
(Maybe MOOnet will use it later).

.port The network port this MOO listens on.

A list of sites where more than 2 levels of host name are
significant, e.g., if you want '' to be
different than '', put "" as an
element in .large_domains.

Email address to which problems with MOO mail should
go. This should be a real email address that someone reads.

Hostname to connect to for dropping off mail. Usually can
just be "localhost".

If a MOO character sends email, where does a reply go?
Inserted in 'From:' for mail from characters without
registration addresses.

List of (non-wizard) programmers who can call
:open, :sendmail, :close

You are not logged in.

[home | help | who | search | setup | code]