@verb #70:"do_login_command" this none this rxdo #789 @program #70:"do_login_command" this none this callers() && raise(E_PERM) where = `$string_utils:connection_hostname(connection_name(player)) ! E_INVARG => ""' if ($login:redlisted(where) || $login:blacklisted(where)) try notify(player, "i Forbidden! Connections to our Moo from your site are not allowed.") notify(player, ".") boot_player(player) except (ANY) endtry return endif if (connection_option(player, "flush-command") != "ready") "When a connection is first made to any port, a blank do_login_command is executed by the server. We will hack the connection's 'flush-command' setting to flag if this is the inital blank call, or a subsequent one." "Initially 'flush-command' will be '.flush'; we will set it to 'ready'." set_connection_option(player, "flush-command", "ready") return elseif (!argstr) argstr = "index" elseif (argstr[1] == "/") argstr = argstr[2..$] endif this.total_hits = this.total_hits + 1 if ($login:graylisted(where)) if (time() > $wiz_utils.last_web_alert + 60 * 2) $wiz_utils.last_web_alert = time() $wiz_utils:guard_alert("Gopher-Connection from graylisted site (", where, ") to ", argstr) endif endif separator = $math_utils:min_positive(index(argstr, "!"), index(argstr, "."), index(argstr, ":")) object = argstr[1..separator ? separator - 1 | $] object = tostr(toint(object)) == object ? toobj(object) | E_NONE parameter = separator ? argstr[separator + 1..$] | "" separator = separator ? argstr[separator] | "" if (this:fileexists(argstr)) "It's a request for a prewritten file on $gopherd." data = this:fileread(argstr) for line in (data) notify(player, strsub(line, "|", $su.tab)) $command_utils:suspend_if_needed(1) endfor elseif (index(argstr, "search") == 1) "Search the Moo." q = argstr[7..$] for line in (this:search_page(q)) notify(player, line) $command_utils:suspend_if_needed(1) endfor elseif (object != E_NONE && !separator) "It's an object number." for line in (this:object_page(object)) notify(player, line) $command_utils:suspend_if_needed(1) endfor elseif (object != E_NONE && !valid(object) && separator) "Invalid object." notify(player, tostr("Sorry, ", object, " doesn't exist!")) notify(player, ".") elseif (object != E_NONE && separator == ".") "It's a property." for line in (this:prop_page(object, parameter)) notify(player, line) $command_utils:suspend_if_needed(1) endfor elseif (object != E_NONE && separator == ":") "It's a verb." for line in (this:verb_page(object, parameter)) notify(player, line) $command_utils:suspend_if_needed(1) endfor elseif (object != E_NONE && separator == "!") "It's a file." for line in (this:file_page(object, parameter)) notify(player, line) $command_utils:suspend_if_needed(1) endfor else "Huh? Page not found." notify(player, tostr("1'", argstr, "' doesn't exist!", $su.tab, $su.tab, $site, $su.tab, this.port)) notify(player, ".") endif boot_player(player) "Last modified by Dax (#789) on Tue May 3 14:11:54 2005 MDT." .