SeenPlugin.seenUsers

Our associative array (AA) of seen users; a dictionary keyed with users' nicknames and with values that are UNIX timestamps, denoting when that user was last *seen* online.

A RehashingAA is used instead of a native long[string], merely to be able to ensure a constant level of rehashed-ness.

class SeenPlugin
private
RehashingAA!(long[string]) seenUsers;

Examples

seenUsers["joe"] = Clock.currTime.toUnixTime();
// ..later..
immutable nowInUnix = Clock.currTime.toUnixTime();
writeln("Seconds since we last saw joe: ", (nowInUnix - seenUsers["joe"]));