Skip to content

Commit

Permalink
more things
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeRandomOwl committed May 2, 2016
1 parent 529547c commit 07b1f7b
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,27 @@ function writeJSON(path, data, callback) {
});
});
}

function secondsToTime(secs) {
var hours = Math.floor(secs / (60 * 60));

var divisor_for_minutes = secs % (60 * 60);
var minutes = Math.floor(divisor_for_minutes / 60);

var divisor_for_seconds = divisor_for_minutes % 60;
var seconds = Math.ceil(divisor_for_seconds);

var obj = {
"h": hours,
"m": minutes,
"s": seconds
};
return obj;
}
function gettime() {
var timenow = Math.floor(Date.now()/1000)
return timenow
}
/*/Lists currently connected severs and writes them to json/*/
function serverlist(verb) {
if (verb) {
Expand Down Expand Up @@ -820,8 +841,8 @@ bot.on('message', function(user, userID, channelID, message, rawEvent) {
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
terminal: true
});
rl.on('line', function(line) {
consoleparse(line);
})
})

0 comments on commit 07b1f7b

Please sign in to comment.