Something like this will tell you the last date and time the char logged
out....

time_t com_time;
com_time = victim->logon;
sprintf(buf, "%s", ctime(com_time));
send_to_char(buf, ch);

If you want to get the time that has passed, use something like
diff = time(NULL) - victim->logon;

That will give you how many seconds have passed since the last
logon.  You can calc the days,hours, etc from that....


----- Original Message -----
From: "Frank W." <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, August 19, 2002 7:13 PM
Subject: Whowas addition


>
>
>
> Hi
> I am trying to expand the whowas command to show how long its been since
the
> character was logged in. I want it to actually subtrack and
> show the amount of time that has passed since the last login.
> Do you have any idea of how I could go about doing this?
>
> Frank
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>

Reply via email to