Work on user options

This commit is contained in:
calzoneman 2013-12-25 16:18:21 -05:00
parent fc63191773
commit 9d49df6157
8 changed files with 197 additions and 258 deletions

View file

@ -1610,7 +1610,7 @@ Channel.prototype.addMedia = function(data, user) {
if (self.dead)
return;
if (err) {
if (err && err !== "Item not in library") {
user.socket.emit("queueFail", {
msg: "Internal error: " + err,
link: $util.formatLink(data.id, data.type)

View file

@ -103,6 +103,11 @@ function handleConnection(sock) {
user.name = sock.handshake.user.name;
user.global_rank = sock.handshake.user.global_rank;
user.loggedIn = true;
user.socket.emit("login", {
success: true,
name: user.name
});
user.socket.emit("rank", user.global_rank);
}
}

View file

@ -43,7 +43,8 @@ function sendJade(res, view, locals) {
if (!(view in cache) || process.env['DEBUG']) {
var file = path.join(templates, view + '.jade');
var fn = jade.compile(fs.readFileSync(file), {
filename: file
filename: file,
pretty: true
});
cache[view] = fn;
}