kameloso.plugins.seen

The Seen plugin implements "seen"; the ability for someone to query when a given nickname was last encountered online.

We will implement this by keeping an internal long[string] associative array of timestamps keyed by nickname. Whenever we see a user do something, we will update his or her timestamp to the current time. We'll save this array to disk when closing the program and read it from file when starting it, as well as saving occasionally once every few (compile time-configurable) minutes.

We will rely on the ChanQueriesService to query channels for full lists of users upon joining new ones, including the ones we join upon connecting. Elsewise, a completely silent user will never be recorded as having been seen, as they would never be triggering any of the functions we define to listen to. (There's a setting to ignore non-chatty events, as we'll see later.)

kameloso does primarily not use callbacks, but instead annotates functions with UDAs of IRC event *types*. When an event is incoming it will trigger the function(s) annotated with its type.

Callback delegates and Fibers *are* supported but are not the primary way to trigger event handler functions. Such can however be registered to process on incoming events, or scheduled with a reasonably high degree of precision.

Members

Classes

SeenPlugin
class SeenPlugin

This is your plugin to the outside world, the only thing publicly visible in the entire module. It only serves as a way of proxying calls to our top-level private functions, as well as to house plugin-specific and -private variables that we want to keep out of top-level scope for the sake of modularity. If the only state is in the plugin, several plugins of the same kind can technically be run alongside each other, which would allow for several bots to be run in parallel. This is not yet supported but there's fundamentally nothing stopping it.

Mixins

__anonymous
mixin ChannelAwareness!omniscientChannelPolicy

Complementary to UserAwareness is ChannelAwareness, which will add in book-keeping about the channels the bot is in, their topics, modes, and list of participants. Channel awareness requires user awareness, but not the other way around.

__anonymous
mixin UserAwareness

UserAwareness is a mixin template; it proxies to a few functions defined in kameloso.plugins.common.awareness to deal with common book-keeping that every plugin *that wants to keep track of users* need. If you don't want to track which users you have seen (and are visible to you now), you don't need this.

__anonymous
mixin PluginRegistration!SeenPlugin

Mixes in a module constructor that registers this module's plugin to be instantiated on program startup/connect.

Mixed In Members

From mixin UserAwareness

hasUserAwareness
enum hasUserAwareness;

Flag denoting that UserAwareness

has been mixed in.

__anonymous
mixin kameloso.plugins.common.awareness.MinimalAuthentication!(debug_, module_)
Undocumented in source.
onUserAwarenessQuitMixin
void onUserAwarenessQuitMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onUserAwarenessQuit.

onUserAwarenessNickMixin
void onUserAwarenessNickMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onUserAwarenessNick.

onUserAwarenessCatchTargetMixin
void onUserAwarenessCatchTargetMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onUserAwarenessCatchTarget.

onUserAwarenessCatchSenderMixin
void onUserAwarenessCatchSenderMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onUserAwarenessCatchSender.

onUserAwarenessNamesReplyMixin
void onUserAwarenessNamesReplyMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onUserAwarenessNamesReply.

onUserAwarenessEndOfListMixin
void onUserAwarenessEndOfListMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onUserAwarenessEndOfList.

onUserAwarenessPingMixin
void onUserAwarenessPingMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onUserAwarenessPing.

From mixin ChannelAwareness!omniscientChannelPolicy

hasChannelAwareness
enum hasChannelAwareness;

Flag denoting that ChannelAwareness has been mixed in.

pattern
enum pattern;
Undocumented in source.
message
enum message;
Undocumented in source.
onChannelAwarenessSelfjoinMixin
void onChannelAwarenessSelfjoinMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessSelfjoin.

onChannelAwarenessSelfpartMixin
void onChannelAwarenessSelfpartMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessSelfpart.

onChannelAwarenessJoinMixin
void onChannelAwarenessJoinMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessJoin.

onChannelAwarenessPartMixin
void onChannelAwarenessPartMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessPart.

onChannelAwarenessNickMixin
void onChannelAwarenessNickMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessNick.

onChannelAwarenessQuitMixin
void onChannelAwarenessQuitMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessQuit.

onChannelAwarenessTopicMixin
void onChannelAwarenessTopicMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessTopic.

onChannelAwarenessCreationTimeMixin
void onChannelAwarenessCreationTimeMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessCreationTime.

onChannelAwarenessModeMixin
void onChannelAwarenessModeMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessMode.

onChannelAwarenessWhoReplyMixin
void onChannelAwarenessWhoReplyMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessWhoReply.

onChannelAwarenessNamesReplyMixin
void onChannelAwarenessNamesReplyMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessNamesReply.

onChannelAwarenessModeListsMixin
void onChannelAwarenessModeListsMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessModeLists.

onChannelAwarenessChannelModeIsMixin
void onChannelAwarenessChannelModeIsMixin(IRCPlugin plugin, IRCEvent event)

Proxies to onChannelAwarenessChannelModeIs.

See Also

Meta