A few minor fixes, also #261

This commit is contained in:
calzoneman 2013-08-21 23:10:55 -05:00
parent 5f70e9dc80
commit 6f0e1e96a1
3 changed files with 3 additions and 2 deletions

View File

@ -385,7 +385,7 @@ Channel.prototype.tryRegister = function (user) {
[self.name, "Insufficient permissions"]); [self.name, "Insufficient permissions"]);
user.socket.emit("registerChannel", { user.socket.emit("registerChannel", {
success: false, success: false,
error: "You don't have permission to register self channel" error: "You don't have permission to register this channel"
}); });
} }
else { else {

View File

@ -1071,7 +1071,7 @@ Database.prototype.genPasswordReset = function (ip, name, email, callback) {
query = "INSERT INTO password_reset " + query = "INSERT INTO password_reset " +
"(ip, name, hash, email, expire) VALUES (?, ?, ?, ?, ?) " + "(ip, name, hash, email, expire) VALUES (?, ?, ?, ?, ?) " +
"ON DUPLICATE KEY UPDATE hash=?, expire=?"; "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) { function (err, res) {
if(err) { if(err) {
callback(err, null); callback(err, null);

View File

@ -149,6 +149,7 @@ User.prototype.initCallbacks = function() {
}); });
} }
self.channel.userJoin(self); self.channel.userJoin(self);
self.autoAFK();
}); });
self.socket.on("login", function(data) { self.socket.on("login", function(data) {