mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-29 21:41:00 +00:00
Updated some minor server stuff
This commit is contained in:
2
server/public/assets/dist/embed.min.js
vendored
2
server/public/assets/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
2
server/public/assets/dist/main.min.js
vendored
2
server/public/assets/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -124,6 +124,9 @@ $().ready(function(){
|
|||||||
$(".connect_error").fadeOut(function(){
|
$(".connect_error").fadeOut(function(){
|
||||||
$(".connect_error").remove();
|
$(".connect_error").remove();
|
||||||
Materialize.toast("Connected!", 2000, "green lighten");
|
Materialize.toast("Connected!", 2000, "green lighten");
|
||||||
|
if(offline) {
|
||||||
|
socket.emit("offline", {status: true, channel: chan != undefined ? chan.toLowerCase() : ""});
|
||||||
|
}
|
||||||
if((Crypt.get_pass(chan.toLowerCase()) !== undefined && Crypt.get_pass(chan.toLowerCase()) !== "")){
|
if((Crypt.get_pass(chan.toLowerCase()) !== undefined && Crypt.get_pass(chan.toLowerCase()) !== "")){
|
||||||
socket.emit("password", {password: Crypt.crypt_pass(Crypt.get_pass(chan.toLowerCase())), channel: chan.toLowerCase()});
|
socket.emit("password", {password: Crypt.crypt_pass(Crypt.get_pass(chan.toLowerCase())), channel: chan.toLowerCase()});
|
||||||
}
|
}
|
||||||
@@ -612,7 +615,7 @@ function randomString(length){
|
|||||||
function change_offline(enabled, already_offline){
|
function change_offline(enabled, already_offline){
|
||||||
Crypt.set_offline(enabled);
|
Crypt.set_offline(enabled);
|
||||||
offline = enabled;
|
offline = enabled;
|
||||||
socket.emit("offline", enabled);
|
socket.emit("offline", {status: enabled, channel: chan != undefined ? chan.toLowerCase() : ""});
|
||||||
$("#offline-mode").tooltip('remove');
|
$("#offline-mode").tooltip('remove');
|
||||||
if(enabled){
|
if(enabled){
|
||||||
if(list_html){
|
if(list_html){
|
||||||
|
|||||||
@@ -207,10 +207,17 @@ io.on('connection', function(socket){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on("offline", function(status){
|
socket.on("offline", function(msg){
|
||||||
|
if(!msg.hasOwnProperty('status') && !msg.hasOwnProperty('channel')) {
|
||||||
|
socket.emit("update_required");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var status = msg.status;
|
||||||
|
var channel = msg.channel;
|
||||||
if(status){
|
if(status){
|
||||||
in_list = false;
|
in_list = false;
|
||||||
offline = true;
|
offline = true;
|
||||||
|
if(channel != "") coll = channel;
|
||||||
if(coll !== undefined && lists[coll] !== undefined && contains(lists[coll], guid))
|
if(coll !== undefined && lists[coll] !== undefined && contains(lists[coll], guid))
|
||||||
{
|
{
|
||||||
var index = lists[coll].indexOf(guid);
|
var index = lists[coll].indexOf(guid);
|
||||||
|
|||||||
Reference in New Issue
Block a user