+
+
+ Loading...
+ If this takes longer than 30 seconds, it will automatically reload a maximum of 5 times.
+ If it still doesn't work, use the bug report button at the top right of the window.
+
+
+ The connection has been closed because the server is restarting. Please wait while you automatically reconnect.
', 'internal');
+ } else if (data == 'stopaudio') {
+ $('.dectalk').remove();
+ } else {
+ //Oh we're actually being sent data instead of an instruction
+ var dataJ;
+ try {
+ dataJ = $.parseJSON(data);
+ } catch (e) {
+ //But...incorrect :sadtrombone:
+ window.onerror('JSON: '+e+'. '+data, 'browserOutput.html', 327);
+ return;
+ }
+ data = dataJ;
+
+ if (data.clientData) {
+ if (opts.restarting) {
+ opts.restarting = false;
+ $('.connectionClosed.restarting:not(.restored)').addClass('restored').text('The round restarted and you successfully reconnected!');
+ }
+ if (!data.clientData.ckey && !data.clientData.ip && !data.clientData.compid) {
+ //TODO: Call shutdown perhaps
+ return;
+ } else {
+ handleClientData(data.clientData.ckey, data.clientData.ip, data.clientData.compid);
+ }
+ } else if (data.modeChange) {
+ changeMode(data.modeChange);
+ } else if (data.firebug) {
+ if (data.trigger) {
+ internalOutput('You are either AFK, experiencing lag or the connection has closed.
', 'internal');
+ }
+ } else if (opts.noResponse) { //Previous ping attempt failed ohno
+ $('.connectionClosed[data-count="'+opts.noResponseCount+'"]:not(.restored)').addClass('restored').text('Your connection has been restored (probably)!');
+ opts.noResponse = false;
+ }
+ }, 2000); //2 seconds
+
+
+ /*****************************************
+ *
+ * LOAD SAVED CONFIG
+ *
+ ******************************************/
+ var savedConfig = {
+ 'sfontSize': getCookie('fontsize'),
+ 'sfontType': getCookie('fonttype'),
+ 'spingDisabled': getCookie('pingdisabled'),
+ 'shighlightTerms': getCookie('highlightterms'),
+ 'shighlightColor': getCookie('highlightcolor'),
+ };
+
+ if (savedConfig.sfontSize) {
+ $messages.css('font-size', savedConfig.sfontSize);
+ internalOutput('