Skip to content

Commit

Permalink
Removed use of process.mixin().
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgonzalez committed Apr 12, 2010
1 parent a8784b6 commit 95467b5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
10 changes: 9 additions & 1 deletion lib/channel.js
Expand Up @@ -13,7 +13,7 @@ function Channel(options) {
this.sessions = {};
}

process.mixin(Channel.prototype, {
extend(Channel.prototype, {
appendMessage: function(nick, type, text) {
var message = {
nick: nick,
Expand Down Expand Up @@ -104,3 +104,11 @@ process.mixin(Channel.prototype, {
});

exports.Channel = Channel;



function extend(obj, props) {
for (var prop in props) {
obj[prop] = props[prop];
}
}
10 changes: 9 additions & 1 deletion lib/server.js
Expand Up @@ -11,7 +11,7 @@ function Server() {
this.channels = [];
}

process.mixin(Server.prototype, {
extend(Server.prototype, {
listen: function(port, host) {
this.httpServer.listen(port, host);
},
Expand Down Expand Up @@ -153,3 +153,11 @@ Function.prototype.partial = function() {
return fn.apply(this, args.concat(slice.call(arguments)));
};
};



function extend(obj, props) {
for (var prop in props) {
obj[prop] = props[prop];
}
}
8 changes: 3 additions & 5 deletions lib/session.js
Expand Up @@ -13,10 +13,8 @@ function Session(nick) {
this.timestamp = new Date();
}

process.mixin(Session.prototype, {
poke: function() {
this.timestamp = new Date();
}
});
Session.prototype.poke = function() {
this.timestamp = new Date();
};

exports.Session = Session;

0 comments on commit 95467b5

Please sign in to comment.