Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!(this.status == "0" || this.status == "1") || !(this.id > 0)) {return false;}
- if($('#server-info-block-'+this.id).length) {
- var block = $('#server-info-block-'+this.id);
- if(block.find('.server-info-status img').attr('src').match(/offline/)){var WasOffline = true;}else{var WasOffline = false;}
- if((WasOffline && this.status == "1") || (!WasOffline && this.status == "0")){var StatusChange = true;}else{var StatusChange = false;}
- if(block.find('.server-info-status').length){if(StatusChange){if(this.status == "0") {block.find('.server-info-status img.online').hide();block.find('.server-info-status img.offline').show()} else {block.find('.server-info-status img.offline').hide();block.find('.server-info-status img.online').show()}}}
- if(block.find('.server-info-name').length){var GetElement = block.find('.server-info-name a');if(StatusChange || GetElement.text() != this.title || (this.status == "1" && !GetElement.attr('href').match(this.host))){if(this.status == "0") {GetElement.attr('href', '#').attr('title', 'Server offline').text(this.title);} else {GetElement.attr('href', 'steam://connect/'+this.host+':'+this.port).attr('title', 'Connect to this server').text(this.title);}}}
- if(block.find('.server-info-map').length) {var GetElement = block.find('.server-info-map');if(this.status == "0"){this.current_map = "N/A";}if(this.current_map != GetElement.html()){GetElement.html(this.current_map);}}
- if(block.find('.server-info-players').length){var GetElement = block.find('.server-info-players');if(this.status == "0"){this.numplayers = "0";this.maxplayers = "0";}if(this.numplayers+"/"+this.maxplayers != GetElement.html()){GetElement.html(this.numplayers+"/"+this.maxplayers);}}
- }
Advertisement
Add Comment
Please, Sign In to add comment