-#define GLINE_ACTIVE 0x0001
-#define GLINE_IPMASK 0x0002
-#define GLINE_BADCHAN 0x0004
-#define GLINE_LOCAL 0x0008
-#define GLINE_ANY 0x0010
-#define GLINE_FORCE 0x0020
-#define GLINE_EXACT 0x0040
-#define GLINE_LDEACT 0x0080 /* locally deactivated */
-#define GLINE_GLOBAL 0x0100 /* find only global glines */
-#define GLINE_LASTMOD 0x0200 /* find only glines with non-zero lastmod */
-#define GLINE_OPERFORCE 0x0400 /* oper forcing gline to be set */
+/** Action to perform on a G-line. */
+enum GlineAction {
+ GLINE_ACTIVATE, /**< G-line should be activated. */
+ GLINE_DEACTIVATE, /**< G-line should be deactivated. */
+ GLINE_LOCAL_ACTIVATE, /**< G-line should be locally activated. */
+ GLINE_LOCAL_DEACTIVATE, /**< G-line should be locally deactivated. */
+ GLINE_MODIFY /**< G-line should be modified. */
+};
+
+#define GLINE_ACTIVE 0x0001 /**< G-line is active. */
+#define GLINE_IPMASK 0x0002 /**< gl_addr and gl_bits fields are valid. */
+#define GLINE_BADCHAN 0x0004 /**< G-line prohibits users from joining a channel. */
+#define GLINE_LOCAL 0x0008 /**< G-line only applies to this server. */
+#define GLINE_ANY 0x0010 /**< Search flag: Find any G-line. */
+#define GLINE_FORCE 0x0020 /**< Override normal limits on G-lines. */
+#define GLINE_EXACT 0x0040 /**< Exact match only (no wildcards). */
+#define GLINE_LDEACT 0x0080 /**< Locally deactivated. */
+#define GLINE_GLOBAL 0x0100 /**< Find only global G-lines. */
+#define GLINE_LASTMOD 0x0200 /**< Find only G-lines with non-zero lastmod. */
+#define GLINE_OPERFORCE 0x0400 /**< Oper forcing G-line to be set. */
+#define GLINE_REALNAME 0x0800 /**< G-line matches only the realname field. */