diff options
author | Matthew Lemon <y@yulqen.org> | 2024-02-10 07:36:35 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-02-10 07:36:35 +0000 |
commit | bd029f8364c1044f9f2b1dae03d102d9b7cefd68 (patch) | |
tree | 79f824f10953e4444d46b8ba717f2d235a3937b8 /fish2024/functions/forge-logins.fish | |
parent | 94662269173d282e27309549fb6fd3afe00535d1 (diff) |
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.
Diffstat (limited to 'fish2024/functions/forge-logins.fish')
-rw-r--r-- | fish2024/functions/forge-logins.fish | 3 |
1 files changed, 3 insertions, 0 deletions
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 |