From bd029f8364c1044f9f2b1dae03d102d9b7cefd68 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 10 Feb 2024 07:36:35 +0000 Subject: Adds fish function/command for forge-logins This will ssh the minecraft container on rimsky, upon which forge is currently running as minecraft, and query the logs for when players joined and return that as a list, sorted by time. You must provide the date as the first argument in the following format: 20Feb2024. --- fish2024/functions/forge-logins.fish | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 fish2024/functions/forge-logins.fish (limited to 'fish2024') diff --git a/fish2024/functions/forge-logins.fish b/fish2024/functions/forge-logins.fish new file mode 100644 index 0000000..67f538f --- /dev/null +++ b/fish2024/functions/forge-logins.fish @@ -0,0 +1,3 @@ +function forge-logins --description 'Get logins on forge server - provide data as 10Feb2024 as first arg.' + ssh minecraft "find ~/forge-server/logs -name \*.gz -print0|xargs -0 zgrep \"joined the game\"|grep \"$argv[1]\"|awk '{print \$1, \$2, \$6}'|cut -d\":\" -f2-|cut -d\" \" -f2-|sed 's/]//'" +end -- cgit v1.2.3