This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Help to check users online-time (server online, not channel)

Old posts that have not been replied to for several years.
Locked
s
sege

Post by sege »

I'd like a funktion to see how long time a users has been connected to the server. The only functions I've found is to check how long users been in a channel.

Is that possible? If; how do I do?

Thanks!
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

capture it from the reply from a whois (numeric 317). note that the whois has to be executed on the server they are actually on to return a 317 (ie WHOIS $nick $nick)
s
sege

Post by sege »

Hmm, but then I get the signon-time in a not so very nice format, don't I? I get it in text.

What i want to do is to show how many days, hours, minutes a user been online...
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

no, you get a 32bit integer from 317, the number of seconds since 0000 hours, jan 1 1970 (ie, standard unix time format), which you can mathematically manipulate into any format you like
s
sege

Post by sege »

Hmm, oki, i'll play with that and see what I can do. Thanks!

BTW, where can I find info about the different raw-types?
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

rfc1459
s
sege

Post by sege »

317 RPL_WHOISIDLE
"<nick> <integer> :seconds idle"

Hmm, how do I get online-time from this?

Coudl you give me a short example or something?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

RFC1459 is very old and most servers have all sorts of extensions to it. Try telnetting to your irc server and looking for yourself what information is contained in the 317 reply.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

yah, sorry, i shoulda checked it myself before pointing it to ya. current implementation is this

317 RPL_WHOISIDLE
"<nick> <integer> <integer> :seconds idle, signon time"
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

On 2002-03-22 11:47, Petersen wrote:
[snip]
current implementation is this

317 RPL_WHOISIDLE
"<nick> <integer> <integer> :seconds idle, signon time"
... on most servers :smile:

/me points at irc.stealth.net...
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

stealth still follows rfc 317
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

On 2002-03-22 15:14, Petersen wrote:
stealth still follows rfc 317
March 20, 1972... Jon Postel... wow :wink:
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

bah, you know what i mean.
/me sulks
s
sege

Post by sege »

It's working now, thanks for all help.
Locked