View/Edit #12:is_expired

Switch to edit mode.

Name(s): is_expired
1:  "Has the player expired."
2:  "Optional argument allows one to check for future expiry times."
3:  if (this:isa($project))
4:    "I have no idea what to do with projects. -- Dax"
5:    return 0
6:  endif
7:  if (this:isa($wiz))
8:    "Nuking a wizard is usually a bad move."
9:    return 0
10: endif
11: {?now = time()} = args
12: day = 60 * 60 * 24
13: if (this.first_connect_time == $maxint && this.last_web_time == 0 && this.last_disconnect_time < now + day)
14:   "This is a person who registered more than a day ago but has never logged in."
15:   return 1
16: endif
17: return 0
18: month = 60 * 60 * 24 * 30
19: "Has the player been away for longer than they've been active with us?"
20: firstseen = this.first_connect_time
21: if (firstseen > time() && this.last_web_time)
22:   firstseen = this.last_web_time
23: endif
24: lastseen = max(this.last_web_time, this.last_disconnect_time, this.last_connect_time)
25: lifespan = lastseen - firstseen
26: return now > lastseen + lifespan + month
27: "Last modified by Dax (#789) on Sat May 21 21:49:29 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

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