This commit is contained in:
Louis Mazin 2025-12-09 19:21:01 +01:00
parent a6f82bbd6c
commit 045d849b59

View File

@ -35,7 +35,7 @@ const parseLogMessage = (log) => {
// Détecter les déconnexions: [2025-12-09 18:55:19] [LOG] Nami left the server. (User id: gdk_2535420062888893) // Détecter les déconnexions: [2025-12-09 18:55:19] [LOG] Nami left the server. (User id: gdk_2535420062888893)
const disconnectRegex = /\[.*?\]\s*\[LOG\]\s*(.+?)\s+left the server\.\s*\(User id:\s*(.+?)\)/i; const disconnectRegex = /\[.*?\]\s*\[LOG\]\s*(.+?)\s+left the server\.\s*\(User id:\s*(.+?)\)/i;
const disconnectMatch = log.match(disconnectRegex); const disconnectMatch = log.match(disconnectRegex);
console.log(disconnectMatch);
if (disconnectMatch) { if (disconnectMatch) {
const playerName = disconnectMatch[1].trim(); const playerName = disconnectMatch[1].trim();
const userId = disconnectMatch[2].trim(); const userId = disconnectMatch[2].trim();