Implement a per-connection-class default usermode option.
[ircu2.10.12-pk.git] / include / client.h
index ec918b007d08d24acc9fd831909b33d8368722f9..f6500bc481b6f80619bb80fe9691224e23ffeb30 100644 (file)
@@ -81,6 +81,8 @@ typedef unsigned long flagpage_t;
 #define FLAGSET_SET(set, flag) (set).bits[FLAGSET_INDEX(flag)] |= FLAGSET_MASK(flag)
 #define FLAGSET_CLEAR(set, flag) (set).bits[FLAGSET_INDEX(flag)] &= ~FLAGSET_MASK(flag)
 
+#define infousermodes "dioswkgx"
+
 enum Priv
   {
     PRIV_CHAN_LIMIT, /* no channel limit on oper */
@@ -453,6 +455,9 @@ struct Client {
 #define SetHiddenHost(x)        SetFlag(x, FLAG_HIDDENHOST)
 #define SetPingSent(x)          SetFlag(x, FLAG_PINGSENT)
 
+#define SeeOper(sptr,acptr) (IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) \
+                            || HasPriv(sptr, PRIV_SEE_OPERS)))
+
 #define ClearAccess(x)          ClrFlag(x, FLAG_CHKACCESS)
 #define ClearBurst(x)           ClrFlag(x, FLAG_BURST)
 #define ClearBurstAck(x)        ClrFlag(x, FLAG_BURST_ACK)
@@ -527,6 +532,7 @@ typedef enum ShowIPType {
 } ShowIPType;
 
 extern const char* get_client_name(const struct Client* sptr, int showip);
+extern const char* client_get_default_umode(const struct Client* sptr);
 extern int client_get_ping(const struct Client* local_client);
 extern void client_drop_sendq(struct Connection* con);
 extern void client_add_sendq(struct Connection* con,