MOO-cows Mailing List Archive


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

>>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!
>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.

It's inconsistent for idle_seconds() to work and for connected_seconds() not
to work.  A negative object -is- connected; it's not -logged-in-.  I've looked
at the server code (shudder) and I can't see why connected_seconds() is
bombing this way.  (All my attempts to fix it turned to yucki, too.)

The Programmer's Manual has this to say on the matter:
 - Function: int connected_seconds (obj PLAYER)
 - Function: int idle_seconds (obj PLAYER)
     These functions return the number of seconds that the currently-active
     connection to PLAYER has existed and been idle, respectively.  If PLAYER
     is not the object number of a player object with a currently-active
     connection, then `E_INVARG' is raised.
... which implies to me that, since idle_seconds() works, connected_seconds()
should also work.  So nyah.

Seth / Blackbriar
Seth I. Rich -
                                 There is nothing more precious than
Rabbits on walls, no problem.    a tear of true repentance.

Home | Subject Index | Thread Index