Remove GPS pings in crosschat (#172)

* Remove GPS pings in crosschat

Cross-server gps pings are annoying, lets fix that

* Lets just do it the right way <3

Should be better

* Take 2

Let's try that again
This commit is contained in:
AreYouScared authored and Daniel committed 2019-07-19 12:05:03 +02:00
1 parent de92ca96b9
commit ee6ab6ab72
1 file changed
+8 -5
+8 -5
View File
@@ -22,12 +22,15 @@ module.exports = class remoteCommands {
words.shift();
words.shift();
words.shift();
let message = words.join(" ").replace(/[";]/g, " ").replace(/[']/g,"").replace("/shout ", "").replace("!shout", "");
let message = words.join(" ").replace(/[";]/g, " ").replace(/[']/g,"").replace("/shout ", "").replace("!shout ","").replace(/\[gps=.*?\]/g, "").replace(/\[train=.*?\]/g, "");
let instance = await this.getInstanceName(data.instanceID);
this.messageInterface("/silent-command game.print('[" + instance + "] " + message + "')");
}
let instance = await this.getInstanceName(data.instanceID);
if(data.data.includes("[gps=")){
//Nothing
}else{
this.messageInterface("/silent-command game.print('[" + instance + "] " + message + "')");
}
}
}
});
}