Implement a per-connection-class default usermode option.
[ircu2.10.12-pk.git] / include / client.h
index 4d61472e7f12c13f0f0598773c828b2ccb6b879a..f6500bc481b6f80619bb80fe9691224e23ffeb30 100644 (file)
@@ -53,7 +53,6 @@ struct SLink;
 struct Server;
 struct User;
 struct Whowas;
-struct DNSReply;
 struct hostent;
 struct Privs;
 struct AuthRequest;
@@ -82,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 */
@@ -191,7 +192,7 @@ struct Connection
   struct SLink*       con_confs; /* Configuration record associated */
   HandlerType         con_handler; /* message index into command table
                                      for parsing */
-  struct DNSReply*    con_dns_reply; /* DNS reply used during client
+  struct hostent*    con_dns_reply; /* DNS reply used during client
                                        registration */
   struct ListingArgs* con_listing;
   unsigned int        con_max_sendq; /* cached max send queue for client */
@@ -454,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)
@@ -528,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,