MOO-cows Mailing List Archive


Re: connected_seconds() fails for not-yet-connected folks

>At 01:56 PM 6/10/96 PDT, Seth I. Rich wrote:
>>I'm using an unmodified LambdaMOO-1.8.0p5, and I'm examining a not-yet-
>>connected fellow, say #-20, who shows up in `connected_players(1)' and
>>whose idle time I may see with `idle_seconds(#-20)', but I get E_INVARG
>>when I try to view `connected_seconds(#-20)'.  This isn't right, right?
>Okay, to rephrase your message:
>You're looking at an unconnected player, and you check their
>connected_seconds().  Why does it return E_INVARG?  They're not connected!

Au contraire, as I understand the jargon, if there's a network connection
open from the player's host to the MOO, then they're connected.
The fact that the object # associated with that connection is negative
indicates that they're not logged in, not that they're not connected.

>Connected_seconds() starts when they get the '*** Connected ***' message.
>Because of this, on a lagged MOO, people may have a higher idle time than
>connection time.

So, perhaps it would be useful to allow connected_seconds(who) for #who < 0...
Ie make connected_seconds return the number of seconds this connection has
been open for (as its name suggests), not the number of seconds the player
using it has been logged in for (which is what it currently does).

Matthew Sanderson
The Australian National University, Canberra.

"Computers in the future may weigh no more than 1.5 tons."
     --Popular Mechanics, forecasting the relentless march of science, 1949

Home | Subject Index | Thread Index