/** * Module Name: Remind * Description: Reminds you */ var crypto = require('crypto'); var remind = function(dbot) { var self = this; this.internalAPI = { 'getSeconds': function(number,interval) { switch(interval) { case "d": return number*24*60*60; case "h": return number*60*60; case "m": return number*60; case "s": return number; } }.bind(this), 'doReminder': function(event,user,time,message) { var now = Date.now(); var datesplits = time.match(/[0-9]+[dhms]/g); if(datesplits == null) { event.reply("The time parameter was not a valid time mah boy, it was "+time); return; } var timeinseconds = 0; for(var i=0;i