socket rooms! and almost finished rep (socket updates) except for one small bug where current_user isnt being pulled

This commit is contained in:
psychobunny
2013-05-03 19:31:21 +00:00
parent 5e48b4cdc5
commit bcb672e1fe
6 changed files with 75 additions and 33 deletions

View File

@@ -21,6 +21,13 @@ var ajaxify = {};
ajaxify.go = function(url, callback) {
// leave room and join global
if (current_room != 'global') {
socket.emit('event:enter_room', 'global');
current_room = 'global';
}
var url = url.replace(/\/$/, "");
var tpl_url = (url === '' || url === '/') ? 'home' : url.split('/')[0];