WARNING: Tech stuff inside!
Logger Plugin
This plugin is the new default plugin for logging, basically it logs all the events that we find useful to a sqlite database on your computer, in this way, you have only one file of logs, accessible through a sqlite client, and it allow you to make querys interactively or using a GUI front end.
here are some example querys:
select all the messages where someone said dx and the mail of the person
select u.account, ce.data from user u, conversation_event ce, event e where u.id = ce.id_user and ce.id_event = e.id and e.name = "message" and ce.data like "%dx%";
select all the personal messages that a user a@… has changed
select u.account, ue.data from user u, user_event ue, event e where u.id = ue.id_user and ue.id_event = e.id and e.name = "personal-message-changed" and u.account = "a@b.com";
select all the nick changes
select u.account, ue.data from user u, user_event ue, event e where u.id = ue.id_user and ue.id_event = e.id and e.name = "nick-changed";
this are just example and you can combine things to do interesting querys like:
- show me all the matches of the event X from user Y between date1 and date2
- statistics like
- average words per message from a user
- average simultaneous conversations
- user that talk the most
- most used word by a user
- user that change the nickname the most
and so on, its a matter of writing the sql commands, you are invited to write them :)
using the API of Logger you can get some interesting information on your contacts ;) for example using eval (this will be a plugin later)
/eval out(controller.pluginManager.getPlugin("Logger").get_last_nick("dude@hotmail.com", 5))
/eval out(controller.pluginManager.getPlugin("Logger").get_last_personal_message("dude@hotmail.com", 5))
/eval out(controller.pluginManager.getPlugin("Logger").get_last_message("dude@hotmail.com", 5))
/eval out(controller.pluginManager.getPlugin("Logger").get_last_status("dude@hotmail.com", 5))
/eval out(controller.pluginManager.getPlugin("Logger").get_last_display_picture("dude@hotmail.com", 5))
/eval out(controller.pluginManager.getPlugin("Logger").get_last_custom_emoticon("dude@hotmail.com", 5))
this will retrieve the last 5
- nicks
- personal messages
- messages
- status
- display picture's paths
- custom emoticon's paths
from dude@…
more complicated one:
/eval l = controller.pluginManager.getPlugin("Logger").get_last_conversation("dude@hotmail.com", 10)
l.reverse();
for (s, a, d) in l:
out(a + ": " + d.split("\r\n")[2])
return the last 10 messages said on any conversation where dude@… was present
