Permalink
Browse files

Replace stray references to ext.js functions

  • Loading branch information...
1 parent 3a2b35f commit e90343e0728e14f8d04d7d0c9599c47cd2c7fbf8 Joshua Gross committed Sep 25, 2010
Showing with 5 additions and 4 deletions.
  1. +2 −2 server/middleware/im/hub.js
  2. +3 −2 server/middleware/im/user.js
View
4 server/middleware/im/hub.js
@@ -18,14 +18,14 @@ var Hub = module.exports = function Hub(options) {
}, this.reapInterval, this);
}
- this.events.addListener('update', (function(package) {
+ this.events.addListener('update', o_.bind(function(package) {
if(package.constructor === exports.Offline) {
for(var i = 0, l = this.users.length; i < l; i++) {
if(this.users[i].get('username') == package.user)
this.users.splice(i, 1);
}
}
- }).bind(this));
+ }, this));
};
Hub.prototype.destroy = function(sid, fn) {
View
5 server/middleware/im/user.js
@@ -1,5 +1,6 @@
var events = require('events'),
- packages = require('../../libs/packages');
+ packages = require('../../libs/packages'),
+ o_ = require('../../libs/utils');
var User = module.exports = function(id, data) {
this.id = id;
@@ -12,7 +13,7 @@ var User = module.exports = function(id, data) {
this.events = new events.EventEmitter();
this.status = packages.STATUSES[0];
- setInterval(this._expireConns.bind(this), 500);
+ setInterval(o_.bind(this._expireConns, this), 500);
};
User.prototype.receivedUpdate = function(package) {

0 comments on commit e90343e

Please sign in to comment.