Tur-FtpWho. A modified ftpwho to suit my purposes.

First of all, there are four different packages. 99.9% chance you want to 2.1+ version!

One for glftpd version 1.*, one for glftpd 2, one for glftpd 2.1 & one for glftpd 2.1+ (works as of 2017-10-15 with
glFTPd 2.08 BETA3).

Decide which version you should use first.

Note that the 2.1+ version was made/converted by Skeddie (Sked).
https://github.com/Skeddie/projects/blob/master/tur-ftpwho/tur-ftpwho.c
I was going to fix my own as I needed to use one of my old scripts in 2017 that needs it, but then I googled and
found that someone also fixed one up so I stole it =) Hope you wont mind. Thanks a bunch!

Edit tur-ftpwho.c and have a look at 2 settings. 

#define VER
Dont touch this one.

#define KEY     0x0000DEAD   // Default KEY used by DAEMON
This is the ipc_key your glftpd is running with. By default its setup
to match glftpd's default ipc_key.

#define GLGROUP "/glftpd/etc/group"
Full path to your group file.

Note, do not remove the initial #. This isnt a bash script.

To compile it:
gcc -o /glftpd/bin/tur-ftpwho tur-ftpwho.c
chmod 755 /glftpd/bin/tur-ftpwho
Compile the 2.1+ version: gcc -O2 -o tur-ftpwho tur-ftpwho.c

Notes: Version 3 of tur-ftpwho was made by f|owman to include
idle time and group at the end. It works fine with all the 
latest versions on my scripts part from Tur-Speed which needs
an upgrade.
Version 4.0 (GL2.01+) - fixed for 64bit and cleaned up by Sked.

To verify your compiled version, run tur-ftpwho -v

The binary tur-ftpwho in glftpd1 was compiled on RH9
The binary tur-ftpwho in glftpd2 was compiled on Fedora Core 2
The binary tur-ftpwho in glftpd2.1 was compiled on RH9
The binary tur-ftpwho in glftpd2.1+ was compiled on Fedora 43.

The 4.1 version is only for 2.1+ and adds a few more fields at the end.

Output is, in this order:

Username: The name of the user currently logged in.
Process ID (procid): The unique system process ID for that user's connection.
Status (statbuf): Displays the current activity (e.g., Up: for uploading, Dn: for downloading, or Idle:) along with calculated speeds or command names.
Current Directory: The full path of the directory the user is currently in on the server.
Group Name: The human-readable name of the user's primary group, retrieved using the groupid.
Idle Time: The duration (formatted as HH:MM:SS) since the user's last activity. Usually empty if they are not idling.
Host: The remote connection details, usually formatted as ident@IP.
Tagline: The user's custom text motto or group affiliation string.
SSL Flag: The security level of the connection: 0 (None), 1 (Control channel only), or 2 (Control and Data channels).
Login Time: The raw Unix timestamp (seconds since 1970) of when the user first connected.
