Method code for $daemon.startup()

[Turn on line numbering]
arg @args;
var match, port, rx, str, o, ports, msg;

(> .perms(caller(), 'system) <);
rx = tostr(.objname());
rx = "-(p)" + substr(rx, 1, ("_" in rx) - 1) + "=(.*)";
if (find str in (args) where ((match = regexp(str, rx)))) {
    [o, ports] = match;
    ports = .parse_port(ports);
    if (strcmp(o, "p") == 0)
        ports = listen + [ports];
} else {
    ports = listen;
}
(> .start_listening(@ports) <);

// Created 22-Aug-1995 as a part of ColdCore, see: @help Credit

Tlon