Closed jsmailes closed 3 years ago
Hey thanks, this looks great and fulfills #170. Sorry I missed it earlier. I'll test this out and merge it soon.
This looks great as a first pass! I did have one comment I'd like to see addressed. Separately, I wondered if you would be willing to add a small amount of code to persist this data across Cardinal reboots using a lightweight database method that was recently added. I wrote up a quick wiki page on it: https://github.com/JohnMaguire/Cardinal/wiki/Database-Access
I updated this to use a persistent DB, which you can see here: https://github.com/JohnMaguire/Cardinal/tree/seen-plugin
I haven't taken the time yet to actually test out each of these event handlers though, so am not merging to master quite yet. If anyone else wants to take a crack at testing it, that'd be awesome!
Alright - all merged. Enabled it by default in 19191f973cbea1b2001f6812f9b4004d777c6b03. Thanks again for the pull request!
Adds the 'seen' plugin which adds the command
.seen <user>
(with alias.lastseen <user>
).The plugin tracks whenever a user interacts in a channel Cardinal is in, logging their most recent action and when it occurred. Other users can then look up when the user was last active.
This tracking does not persist across reboots of the bot or reloads of the plugin.
The plugin tracks the following events:
irc.privmsg
(channel messages only)irc.notice
(channel notices only)irc.nick
irc.mode
irc.topic
irc.join
irc.part
irc.quit