I finished a initial version of a bot_log.module.
What it does:
* logs everything to {bot_log}
* displays logs at bot/page.
* Filter logs display by channel and page (no UI for this yet, it's bot/page/channel/pagenumber)
* AND it implements the 'seen foo' command:
- matches 'seen foo' and respond with the last message sent by foo.
- phrases like "seen foo? seen bar" or "hey bot, when have you seen foo? I'd really like to know this" work all.
- Does NOT react to all sentences that have 'seen' in it.
- Does only react if either the 'seen foo' is followed by a questionmark or if the message is ending after the construct
It's living in my sandbox atm: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/frando/bot_log/
But of course you can just include it to the main bot if you want. If time permits, I'll add some more stuff to it, e.g. a better "Browse logs" page and some settings.
and hey,
this whole bot idea is really amazing ;)
Comments
Comment #1
Frando commentedCode ist in my sandbox. http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/frando/bot_log/
Comment #2
morbus iffThis will be the next thing I integrate into the bot package - thanks for your work on it!
Comment #3
ChrisKennedy commentedGlad to see this has already been implemented :).
The one thing I see missing is an expiration date for entries so that the database is eventually pruned. This would be a settings entry and hook_cron() implementation to remove expired log entries. This value could be set to a week or two by default, and could also have an unlimited or "don't prune" option.
Comment #4
Frando commentedI updated the code in my sandbox significantly yesterday evening.
bot_log.module now
* logs channel messages, queries to the bot, actions, joins, parts, kicks and topic changes
* provides a log page
* all logs are searchable (via the normal search interface)
* in the settings, you can set up which channels and which types of messages shall be logged
* in the settings, you can specify a period of time after which log entries that are older should be deleted (via cron run)
Everything is working for me so far, but still, this is beta code - it could need some more testing..
Comment #5
Frando commentedOh, and it needs a patch to bot.module to be able to log the bot's responses: http://drupal.org/node/105923
The "seen" command was removed for now. I'll make a seperate module out of this, but it will use the bot_log database table for it.
Comment #6
NeoID commentedWould be cool to use ajax with this module and get the same "fade" effect on new messages as most shoutboxes have :)
Anyway, a great and usefull module...
Comment #7
morbus iffThis is in, more or less. See http://lists.drupal.org/pipermail/development/2007-November/027216.html.
Comment #8
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.