mirror of
https://github.com/reality/dbot.git
synced 2024-12-28 05:32:50 +01:00
inception times for all
This commit is contained in:
parent
fc17201f35
commit
ffd60654b1
@ -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);
|
||||
|
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user