Function usage:
ADDWORLD(name, type,
[host, port
[, char, pass [, file [, flags [, srchost]]]]])
Command usage:
/ADDWORLD [-pxe] [-Ttype] [-ssrchost]
name [char pass] host port
[file]
/ADDWORLD [-Ttype] [-ssrchost]
name
/ADDWORLD [-Ttype] DEFAULT
[char pass [file]]
Defines a new world or redefines an existing world with the name name. Name may not contain spaces; addtionally, when defining a new world, name may not begin with "(".
Host is a server's internet hostname, IPv4 address, or (if your platform supports it) IPv6 address. Port is the number or name of a TCP port on the host. If host and port are blank, then "connecting" to the world will only create a tf window for the world, it will not open an actual network connection; this is called a "connectionless" socket.
There may be a special world named "default" which does not have a host or port. If a normal world is defined without a character, pass, type, or mfile, then that world will use the corresponding field of the "default" world if there is one. If the "default" world is redefined, worlds with omitted fields will use the new default values.
In function form, flags is a string of 0 or more letters that modify the behavior of the function. For compatability with older versions of TF, an "f" or "0" in flags has the same effect as "p", and an "n" or "1" in flags has no effect.
-p
-x
-e
-ssrchost
-Ttype
The library pre-defines WORLD and LOGIN hooks for types that match these glob patterns:
You can define your own world types for use in other triggers or hooks. If you use names that match the glob patterns above, the standard library hooks will still work. For example, if you did:
/test addworld("Cave", "tiny.muck.", "cave.tcp.com", 2283, char, pass) /test addworld("Foo", "tiny.muck.msp.", "foo.com", 9999, char, pass) /test addworld("Cow", "tiny.moo.", "cow.com", 8267, char, pass) /test addworld("Buzz", "tiny.moo.msp.", "buzz.org", 8267, char, pass)then tiny-style autologin would still work (using the library hooks), and you could also define your own triggers and hooks specific to TinyMUCKs or TinyMOOs (e.g., "
/def
-Ttiny.muck.*
")
or to worlds that support MSP regardless of their server type
(e.g., "/def
-T*.msp.*
"),
etc. Note the trailing period on the world type defintions, which
make it easier to write matching triggers.
Any type is valid, but is only useful if it is matched by a "-Ttype" option of a hook or trigger.
If addworld() with a password is executed from a file that has permissions making it readable by others, it will produce a warning. You should change the file permissions to prevent other people from reading your password.
See: worlds, /connect, /fg, /unworld, /edworld, /telnet