handler/SocketIORouter: use jshint

This commit is contained in:
booo 2011-12-22 13:21:45 +01:00
parent 9c126674b3
commit e7b2a2b3b9

View file

@ -43,7 +43,7 @@ exports.addComponent = function(moduleName, module)
//give the module the socket //give the module the socket
module.setSocketIO(socket); module.setSocketIO(socket);
} };
/** /**
* sets the socket.io and adds event functions for routing * sets the socket.io and adds event functions for routing
@ -63,7 +63,7 @@ exports.setSocketIO = function(_socket)
{ {
messageLogger.info("to " + client.id + ": " + stringifyWithoutPassword(message)); messageLogger.info("to " + client.id + ": " + stringifyWithoutPassword(message));
client._send(message); client._send(message);
} };
//tell all components about this connect //tell all components about this connect
for(var i in components) for(var i in components)
@ -143,7 +143,7 @@ exports.setSocketIO = function(_socket)
} }
}); });
}); });
} };
//returns a stringified representation of a message, removes the password //returns a stringified representation of a message, removes the password
//this ensures there are no passwords in the log //this ensures there are no passwords in the log
@ -153,8 +153,8 @@ function stringifyWithoutPassword(message)
for(var i in message) for(var i in message)
{ {
if(i == "password" && message[i] != null) if(i == "password" && message[i])
newMessage["password"] = "xxx"; newMessage.password = "xxx";
else else
newMessage[i]=message[i]; newMessage[i]=message[i];
} }