From 6f0e1e96a134906cd464b3f870017fc94eb30860 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Wed, 21 Aug 2013 23:10:55 -0500 Subject: [PATCH] A few minor fixes, also #261 --- channel.js | 2 +- database.js | 2 +- user.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/channel.js b/channel.js index c3ec769a..5d77ff53 100644 --- a/channel.js +++ b/channel.js @@ -385,7 +385,7 @@ Channel.prototype.tryRegister = function (user) { [self.name, "Insufficient permissions"]); user.socket.emit("registerChannel", { success: false, - error: "You don't have permission to register self channel" + error: "You don't have permission to register this channel" }); } else { diff --git a/database.js b/database.js index 07c78d4e..07943a4e 100644 --- a/database.js +++ b/database.js @@ -1071,7 +1071,7 @@ Database.prototype.genPasswordReset = function (ip, name, email, callback) { query = "INSERT INTO password_reset " + "(ip, name, hash, email, expire) VALUES (?, ?, ?, ?, ?) " + "ON DUPLICATE KEY UPDATE hash=?, expire=?"; - self.query(query, [ip, name, hash, email, exp, hash, expire], + self.query(query, [ip, name, hash, email, expire, hash, expire], function (err, res) { if(err) { callback(err, null); diff --git a/user.js b/user.js index cc6086d2..65b81427 100644 --- a/user.js +++ b/user.js @@ -149,6 +149,7 @@ User.prototype.initCallbacks = function() { }); } self.channel.userJoin(self); + self.autoAFK(); }); self.socket.on("login", function(data) {