1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

Rough support for the updated BetterTTV. It's kind of messy, so I'll investigate a better way to hook into it with less chance of breaking.

Other minor changes.
This commit is contained in:
SirStendec 2015-03-30 00:52:18 -04:00
parent a0ab653e8f
commit 216a82aa5a
10 changed files with 205 additions and 89 deletions

View file

@ -19,7 +19,7 @@ FFZ.prototype.ws_create = function() {
this._ws_pending = this._ws_pending || [];
try {
ws = this._ws_sock = new WebSocket("ws://ffz.stendec.me/");
ws = this._ws_sock = new WebSocket("ws://catbag.frankerfacez.com/");
} catch(err) {
this._ws_exists = false;
return this.log("Error Creating WebSocket: " + err);
@ -51,7 +51,7 @@ FFZ.prototype.ws_create = function() {
}
ws.onclose = function(e) {
f.log("Socket closed.");
f.log("Socket closed. (Code: " + e.code + ", Reason: " + e.reason + ")");
f._ws_open = false;
// When the connection closes, run our callbacks.
@ -94,14 +94,14 @@ FFZ.prototype.ws_create = function() {
if ( command )
command.bind(f)(data);
else
f.log("Invalid command: " + cmd, data);
f.log("Invalid command: " + cmd, data, false, true);
} else {
var success = cmd === 'True',
callback = f._ws_callbacks[request];
if ( ! success || ! callback )
f.log("Socket Reply to " + request + " - " + (success ? "SUCCESS" : "FAIL"), data);
f.log("Socket Reply to " + request + " - " + (success ? "SUCCESS" : "FAIL"), data, false, true);
if ( callback ) {
delete f._ws_callbacks[request];