From 2c14ddf6345a2bccfb0d7316fd50439a53bc3329 Mon Sep 17 00:00:00 2001 From: psteiwer Date: Tue, 20 Aug 2019 15:23:39 -0400 Subject: [PATCH 1/2] Tag raiders if someone joins after 7 minute raid call --- moltres.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/moltres.js b/moltres.js index dc13a39..89b4811 100644 --- a/moltres.js +++ b/moltres.js @@ -33,6 +33,7 @@ mysql.connect({ password: config.dbpass, database: config.dbname || 'moltresdb', supportBigNumbers: true, + socketPath: '/var/run/mysqld/mysqld.sock', bigNumberStrings: true, }) .then(res => { @@ -2990,7 +2991,13 @@ async function handle_join(msg, handle, call_time, extras) { r => r.member.nickname || r.member.user.username ); let others = raiders.length === 1 ? 'other' : 'others'; - output += ` (with ${raiders.length} ${others}: ${names.join(', ')}).`; + output += ` (with ${raiders.length} ${others}: `; + if ((calls.time-get_now())<=420000) { + // If raid is within 7 minute call time, tag joined users + output += `${raiders.map(r => r.member.user).join(' ')}).`; + } else { + output += `${names.join(', ')}).`; + } } else { output += '.'; } From 80716b424ff46d65988c1c1c32865f833caf51df Mon Sep 17 00:00:00 2001 From: psteiwer Date: Tue, 20 Aug 2019 15:29:38 -0400 Subject: [PATCH 2/2] Removing test connection configureation --- moltres.js | 1 - 1 file changed, 1 deletion(-) diff --git a/moltres.js b/moltres.js index 89b4811..d11e0f6 100644 --- a/moltres.js +++ b/moltres.js @@ -33,7 +33,6 @@ mysql.connect({ password: config.dbpass, database: config.dbname || 'moltresdb', supportBigNumbers: true, - socketPath: '/var/run/mysqld/mysqld.sock', bigNumberStrings: true, }) .then(res => {