diff --git a/install b/install index 4e7573d..c3c3162 100755 --- a/install +++ b/install @@ -14,7 +14,7 @@ then exit 1 fi -npm install googlemaps feedparser node-units tvdb method-override 500px process async wordnik node-uuid underscore request sandbox express moment-timezone moment jade databank databank-redis ent passport passport-local password-hash connect-flash +npm install googlemaps humanize feedparser node-units tvdb method-override 500px process async wordnik node-uuid underscore request sandbox express moment-timezone moment jade databank databank-redis ent passport passport-local password-hash connect-flash cd public/ wget https://github.com/twbs/bootstrap/releases/download/v3.3.2/bootstrap-3.3.2-dist.zip diff --git a/modules/imgur/imgur.js b/modules/imgur/imgur.js index 283e9a8..0378b87 100644 --- a/modules/imgur/imgur.js +++ b/modules/imgur/imgur.js @@ -6,7 +6,8 @@ var _ = require('underscore')._, request = require('request'), async = require('async'), - crypto = require('crypto'); + crypto = require('crypto'), + humanise = require('humanize'); var imgur = function(dbot) { this.ApiRoot = 'https://api.imgur.com/3/'; @@ -42,6 +43,8 @@ var imgur = function(dbot) { } info += imgData.views + ' views ('; info += imgData.width + 'x' + imgData.height + ')'; + + info += ' ('+humanise.filesize(imgData.size)+')'; } return info; diff --git a/modules/users/users.js b/modules/users/users.js index 91d8ff4..5b72d3a 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -140,7 +140,6 @@ var users = function(dbot) { }.bind(this); var checkUserTime = function(user, done) { if(!_.has(user, 'lastUsed') || (_.has(user, 'lastUsed') && moment(user.lastUsed).diff(moment(user.lastUsed).add(1, 'day'), 'days') > 0)) { - dbot.api.log.log('tripsit', 'tripbot', '[USERDEBUG] Updating last used date for ' + user.primaryNick); user.lastUsed = moment().unix(); this.db.save('users', user.id, user, done); } else {