@verb #80:"do_login_command" this none this rdo #55
@program #80:"do_login_command" this none this
"Find an object for the webber to log into."
if (callers())
raise(E_PERM)
elseif (`$login:redlisted($string_utils:connection_hostname(connection_name(player))) ! E_INVARG')
try
notify(player, "HTTP/1.0 403 Forbidden")
notify(player, "")
notify(player, "
Forbidden 403Error 403: Forbidden
Connections to our MOO from your site are not allowed.")
boot_player(player)
except (ANY)
endtry
return
endif
for x in (this.owned_objects)
if (!$recycler:valid(x) || !is_player(x))
continue
"Doh! Clean it up next kick"
elseif (x:isa($webber) && !x:connected())
"Rotate the owned objects list."
this.owned_objects = {@setremove(this.owned_objects, x), x}
if ({@this.spies, @this.spies_lowfat})
fork (0)
for y in ({@this.spies, @this.spies_lowfat})
`y:tell(tostr("[", x, "]: *** Connect from ", connection_name(player), ". Formerly ", player, ". ***")) ! ANY'
endfor
endfork
endif
return x
endif
endfor
"Doh! Couldn't find an unconnected object . . ."
"We need to suspend to make a new connection object, and the server ignores any return value may give it if we suspend."
"So, put the connection in stasis..."
set_connection_option(player, "hold-input", 1)
"Set him up so do_login_command can treat him like any other player trying to connect by replaying his string"
force_input(player, argstr, 1)
"Make him a connection object"
x = this:make_new_webber()
"And thaw him out."
`set_connection_option(player, "hold-input", 0) ! ANY'
"And this return value is meaningless"
return 0
"The next time this guy's input queue comes up, he'll send the same line he did, and there will be a fresh new connection object waiting for him to use."
"Last modified by MadHatter (#8371) on Mon Jan 14 10:39:31 2002 MST."
"This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:05 2002 MDT)."
"Last modified by Lao-Tzu (#8084) on Tue Mar 16 10:32:54 2004 MST."
.