Skip to content
Browse files

Updated

  • Loading branch information...
1 parent a3876ef commit 719b8af7b4f1855e747dee92ae63595e0f735431 @jheusala jheusala committed
Showing with 5 additions and 5 deletions.
  1. +4 −4 joker.js
  2. 0 { → old}/cli.js
  3. +1 −1 package.json
View
8 joker.js
@@ -22,7 +22,7 @@ var commands = module.exports = {},
foreach = require('snippets').foreach,
rpad = require('snippets').rpad,
dmapi = require('joker-dmapi'),
- cli = require('./cli.js');
+ cli = require('cli');
commands._opts_ = {'verbose': 0};
@@ -80,7 +80,7 @@ commands['status'] = {
console.log("Joker: online (" + Math.floor(58*60-seconds) + " seconds left)");
} else {
console.log("Joker: offline");
- if(commands._opts.verbose >= 1) {
+ if(commands._opts_.verbose >= 1) {
console.log('DEBUG: seconds = ' + seconds);
if(db && db.auth && db.auth.date) console.log('DEBUG: db.auth.date = ' + db.auth.date);
if(db && db.auth) console.log('DEBUG: db.auth = ' + db.auth);
@@ -106,7 +106,7 @@ commands['login'] = {
db.auth.id = res.auth_id;
db.commit(function(err) { if(err) console.error('error when saving data: ' + err);});
console.log('Logged in!');
- if(commands._opts.verbose >= 1) {
+ if(commands._opts_.verbose >= 1) {
console.log('DEBUG: auth_id = ' + res.auth_id);
}
});
@@ -128,7 +128,7 @@ commands['logout'] = {
db.auth = undefined;
db.commit(function(err) { if(err) console.error('error when saving data: ' + err);});
console.log('Logged out!');
- if(commands._opts.verbose >= 1) {
+ if(commands._opts_.verbose >= 1) {
console.log('DEBUG: auth_id = ' + res.auth_id);
}
});
View
0 cli.js → old/cli.js
File renamed without changes.
View
2 package.json
@@ -17,7 +17,7 @@
},
"devDependencies": {
"snippets": "*",
- "wordwrap": "*"
+ "cli": "*"
},
"optionalDependencies": {}
}

0 comments on commit 719b8af

Please sign in to comment.
Something went wrong with that request. Please try again.