Mori is half complete

This commit is contained in:
2018-11-01 11:51:13 +11:00
parent e4b1434c91
commit e8b2f4b815
7 changed files with 191 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ exports.ConnectToServer = function(username, address, port, pass) { //NOTE: this
io.on("connect", () => io.emit("authentication", {SERVER_PASS_KEY: pass, username: username}) );
io.on("authenticated", () => console.log("Authenticated with server: " + `${address}:${port}`));
io.on("disconnect", () => console.log("disconnected from server: " + `${address}:${port}`));
io.on("error", (err) => { throw err; } );
initialized = true;
}

View File

@@ -9,6 +9,7 @@ exports = module.exports = {};
//typingDelay (optional) - delay in milliseconds for the message, while typing is shown
exports.SendPublicMessage = function(client, user, channel, message, typingDelay = 0) {
//Handle optional second argument (so much for default arugments in node)
//WARNING: this may be funky as fuck due to typingDelay; if so, delete this
if (message === undefined) {
message = channel;
channel = user;