Skip to content

Commit

Permalink
correct indent
Browse files Browse the repository at this point in the history
  • Loading branch information
mohlendo committed Nov 15, 2009
1 parent 8d6aa66 commit e046f6b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ var CHAT_DB_NUMBER = 7;
var DEFAULT_CHANNEL = "default";

var rclient = new redis.Redis(function(r) {
r.select(CHAT_DB_NUMBER);
});
r.select(CHAT_DB_NUMBER);
});

var channels = {};

Expand Down Expand Up @@ -59,18 +59,18 @@ function createChannel(name) {

this.appendMessage = function (nick, type, text) {
rclient.llen(name).addCallback(function (value) {
var m = { index: value
var m = { index: value
, nick: nick
, type: type // "msg", "join", "part"
, text: text
, timestamp: (new Date()).getTime()
};
rclient.rpush(name, JSON.stringify(m));
};
rclient.rpush(name, JSON.stringify(m));

for (var sessionId in members) {
if (!members.hasOwnProperty(sessionId)) continue;
members[sessionId].session.deliver([m]);
}
for (var sessionId in members) {
if (!members.hasOwnProperty(sessionId)) continue;
members[sessionId].session.deliver([m]);
}
});
};

Expand Down Expand Up @@ -173,7 +173,7 @@ function createSession (nick) {
text: text,
timestamp: (new Date()).getTime()
};

if (this.callback) {
this.deliver([message]);
} else {
Expand Down

0 comments on commit e046f6b

Please sign in to comment.