3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 22:39:26 +01:00

inception times for all

This commit is contained in:
reality 2013-10-17 03:06:17 +00:00
parent fc17201f35
commit ffd60654b1
2 changed files with 6 additions and 2 deletions

View File

@ -13,7 +13,8 @@ var api = function(dbot) {
var uStats = {
'id': id,
'lines': 0,
'channels': {}
'channels': {},
'creation': new Date().getTime()
};
this.db.save('user_stats', id, uStats, function(err, uStats) {
callback(uStats);
@ -29,7 +30,8 @@ var api = function(dbot) {
'createChannelStats': function(id, callback) {
var cStats = {
'id': id,
'lines': 0
'lines': 0,
'creation': new Date().getTime()
};
this.db.save('channel_stats', id, cStats, function(err, cStats) {
callback(cStats);

View File

@ -5,6 +5,8 @@
var _ = require('underscore')._;
var sstats = function(dbot) {
if(!_.has(dbot.db, 'ssinception')) dbot.db.ssinception = new Date().getTime();
this.listener = function(event) {
event.cStats.lines++;
event.uStats.lines++;