+/** @file whocmds.h
+ * @brief Support functions for /WHO-like commands.
+ * @version $Id$
+ */
+#ifndef INCLUDED_whocmds_h
+#define INCLUDED_whocmds_h
+
+struct Client;
+struct Channel;
+
+
+/*
+ * m_who()
+ * m_who with support routines rewritten by Nemesi, August 1997
+ * - Alghoritm have been flattened (no more recursive)
+ * - Several bug fixes
+ * - Strong performance improvement
+ * - Added possibility to have specific fields in the output
+ * See readme.who for further details.
+ */
+
+/* Macros used only in here by m_who and its support functions */
+
+#define WHOSELECT_OPER 1 /**< Flag for /WHO: Show IRC operators. */
+#define WHOSELECT_EXTRA 2 /**< Flag for /WHO: Pull rank to see users. */
+#define WHOSELECT_DELAY 4 /**< Flag for /WHO: Show join-delayed users. */
+
+#define WHO_FIELD_QTY 1 /**< Display query type. */
+#define WHO_FIELD_CHA 2 /**< Show common channel name. */
+#define WHO_FIELD_UID 4 /**< Show username. */
+#define WHO_FIELD_NIP 8 /**< Show IP address. */
+#define WHO_FIELD_HOS 16 /**< Show hostname. */
+#define WHO_FIELD_SER 32 /**< Show server. */
+#define WHO_FIELD_NIC 64 /**< Show nickname. */
+#define WHO_FIELD_FLA 128 /**< Show flags (away, oper, chanop, etc). */
+#define WHO_FIELD_DIS 256 /**< Show hop count (distance). */
+#define WHO_FIELD_REN 512 /**< Show realname (info). */
+#define WHO_FIELD_IDL 1024 /**< Show idle time. */
+#define WHO_FIELD_ACC 2048 /**< Show account name. */
+#define WHO_FIELD_OPL 4096 /**< Show oplevel. */
+
+/** Default fields for /WHO */
+#define WHO_FIELD_DEF ( WHO_FIELD_NIC | WHO_FIELD_UID | WHO_FIELD_HOS | WHO_FIELD_SER )