1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-13 01:20:54 +00:00

Pre dev stream

This commit is contained in:
SirStendec 2015-07-04 17:06:36 -04:00
parent b184fc74b2
commit 6a62804ec1
26 changed files with 4658 additions and 732 deletions

View file

@ -51,8 +51,10 @@ FFZ.prototype.ws_create = function() {
// Join the right channel if we're in the dashboard.
if ( f.is_dashboard ) {
var match = location.pathname.match(/\/([^\/]+)/);
if ( match )
if ( match ) {
f.ws_send("sub", match[1]);
f.ws_send("sub_channel", match[1]);
}
}
// Send the current rooms.
@ -69,6 +71,18 @@ FFZ.prototype.ws_create = function() {
}
}
// Send the channel(s).
if ( f._cindex ) {
var channel_id = f._cindex.get('controller.id'),
hosted_id = f._cindex.get('controller.hostModeTarget.id');
if ( channel_id )
f.ws_send("sub_channel", channel_id);
if ( hosted_id )
f.ws_send("sub_channel", hosted_id);
}
// Send any pending commands.
var pending = f._ws_pending;
f._ws_pending = [];