View/Edit #12:@lastlog

Switch to edit mode.

Name(s): @lastlog
1:  "Prints the time and date that the specified player(s) logged on."
2:  if (caller != this)
3:    return $msg:mtell("huh")
4:  elseif (args)
5:    for dude in (listdelete($command_utils:player_match_result($string_utils:match_player(args), args), 1))
6:      if (dude.last_connect_time > time())
7:        player:sub_tell("%1 requested a character on %2, but hasn't logged in yet.", dude, player:ctime(dude.last_disconnect_time))
8:      else
9:        player:sub_tell(dude.last_connect_time < dude.last_disconnect_time ? "%1 last connected on %2 and then disconnected %4 later on %3." | "%1 last disconnected on %3 and then reconnected on %2", dude, player:ctime(dude.last_connect_time), player:ctime(dude.last_disconnect_time), $su:from_seconds(dude.last_disconnect_time - dude.last_connect_time))
10:     endif
11:     if (dude:isa($guest))
12:       "Guests don't login from the web."
13:     elseif (dude.last_web_time)
14:       player:sub_tell("%1 was last logged in on the web %3 ago on %2.", dude, player:ctime(dude.last_web_time), $su:from_seconds(time() - dude.last_web_time))
15:     else
16:       player:sub_tell("%1 has never logged in using the web.", dude)
17:     endif
18:   endfor
19: else
20:   player:tell("Usage:  @lastlog &lt;player&gt; [&lt;player&gt;...]")
21: endif
22: "Last modified by Dax (#789) on Sat Aug 24 21:47:01 2002 MDT."

Verb arguments: any none none
Verb perms: Readable NOT-Debug
Verb owned by: Hacker (#60)

You are not logged in.

[home | help | who | search | setup | code]