From 7f4c97329d782450c7f1267a756fb4dcd0716f41 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Thu, 23 Jul 2015 10:07:56 -0600 Subject: [PATCH] * Some code cleanup --- core/connect.js | 8 ++++---- core/user.js | 25 ------------------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/core/connect.js b/core/connect.js index f89301ec..ef2e54e7 100644 --- a/core/connect.js +++ b/core/connect.js @@ -130,14 +130,14 @@ function connectEntry(client) { // displayBanner(term); -/* var art1 = require('fs').readFileSync('/home/nuskooler/dev/enigma-bbs/mods/themes/NU-MAYA/APPLY1.ANS'); + /* + var art1 = require('fs').readFileSync('/home/nuskooler/dev/enigma-bbs/mods/themes/NU-MAYA/APPLY1.ANS'); term.rawWrite(art1); - - term.write(ansi.resetScreen()); theme.displayThemeArt({client : client, name : 'APPLY1.ANS'}, function onArt() { }); - */ +*/ + setTimeout(function onTimeout() { client.gotoMenuModule( { name : Config.firstMenu }); }, 500); diff --git a/core/user.js b/core/user.js index d10f4edf..56f399af 100644 --- a/core/user.js +++ b/core/user.js @@ -320,35 +320,10 @@ User.prototype.persistProperties = function(cb) { }); }; -// :TODO: A general purpose date/time formatting class or lib would be better here.... -User.prototype.getFormattedBirthDate = function(style) { - style = style || 'medium'; - - switch(style) { - - case 'medium' : - return _.has(this.properties, 'birthdate') ? - new Date(Date.parse(this.properties.birthdate)).toJSON().slice(0, 10) : - null; - } -}; - User.prototype.getAge = function() { if(_.has(this.properties, 'birthdate')) { return moment().diff(this.properties.birthdate, 'years'); } - /* - if(!isNaN(birthDate)) { - var today = new Date(); - var age = today.getFullYear() - birthDate.getFullYear(); - var m = today.getMonth() - birthDate.getMonth(); - if(m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { - age--; - } - - return age; - } - */ }; ///////////////////////////////////////////////////////////////////////////////