fix list crash
This commit is contained in:
parent
1840a95a0d
commit
f1167272e3
16
client.js
16
client.js
|
@ -489,7 +489,7 @@ function mc_login(){
|
|||
|
||||
mc_logged_in = false;
|
||||
console.log("Minecraft: Kicked from server");
|
||||
setTimeout(mc_login, 5000); // reconnect after 5 seconds
|
||||
setTimeout(mc_login, 10000); // reconnect after 10 seconds
|
||||
});
|
||||
|
||||
mc_bot.on("error", function(){
|
||||
|
@ -583,12 +583,13 @@ deek.on("message", async function(msg, user){
|
|||
|
||||
if(
|
||||
mc_bridge_enabled &&
|
||||
mc_logged_in
|
||||
mc_logged_in &&
|
||||
msg.channel === 1
|
||||
){
|
||||
|
||||
// ascii filter
|
||||
var mc_message = msg.text.replace(
|
||||
/[^\n-!\"#$%&'()*+,.\/0123456789:;<=>?@[\\\]^_'abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«» ]/gi,
|
||||
/[^-\n!\"#$%&'()*+,.\/0123456789:;<=>?@[\\\]^_'abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«» ]/gi,
|
||||
"?"
|
||||
);
|
||||
|
||||
|
@ -1231,9 +1232,16 @@ deek.on("message", async function(msg, user){
|
|||
break;
|
||||
|
||||
case "list":
|
||||
case "l":
|
||||
if(mc_bridge_enabled === false){
|
||||
|
||||
send(msg, "Minecraft bridge is disabled");
|
||||
send(msg, "Deekcraft bridge is disabled");
|
||||
break;
|
||||
}
|
||||
|
||||
if(mc_logged_in === false){
|
||||
|
||||
send(msg, "Deekcraft is offline");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue