diff options
Diffstat (limited to 'include/services.h')
| -rw-r--r-- | include/services.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/include/services.h b/include/services.h index cd8c18d84..82631d883 100644 --- a/include/services.h +++ b/include/services.h @@ -597,38 +597,39 @@ typedef struct { /*************************************************************************/ +enum AccessLevel +{ + /* Note that these two levels also serve as exclusive boundaries for valid + * access levels. ACCESS_FOUNDER may be assumed to be strictly greater + * than any valid access level, and ACCESS_INVALID may be assumed to be + * strictly less than any valid access level. Also read below. + */ + ACCESS_FOUNDER = 10000, /* Numeric level indicating founder access */ + ACCESS_INVALID = -10000, /* Used in levels[] for disabled settings */ + /* There is one exception to the above access levels: SuperAdmins will have + * access level 10001. This level is never stored, however; it is only used + * in comparison and to let SuperAdmins win from founders where needed + */ + ACCESS_SUPERADMIN = 10001, + /* Levels for xOP */ + ACCESS_VOP = 3, + ACCESS_HOP = 4, + ACCESS_AOP = 5, + ACCESS_SOP = 10 +}; + /* Channel info structures. Stored similarly to the nicks, except that * the second character of the channel name, not the first, is used to * determine the list. (Hashing based on the first character of the name * wouldn't get very far. ;) ) */ /* Access levels for users. */ -typedef struct { +struct ChanAccess { uint16 in_use; /* 1 if this entry is in use, else 0 */ int16 level; NickCore *nc; /* Guaranteed to be non-NULL if in use, NULL if not */ time_t last_seen; -} ChanAccess; - -/* Note that these two levels also serve as exclusive boundaries for valid - * access levels. ACCESS_FOUNDER may be assumed to be strictly greater - * than any valid access level, and ACCESS_INVALID may be assumed to be - * strictly less than any valid access level. Also read below. - */ -#define ACCESS_FOUNDER 10000 /* Numeric level indicating founder access */ -#define ACCESS_INVALID -10000 /* Used in levels[] for disabled settings */ -/* There is one exception to the above access levels: SuperAdmins will have - * access level 10001. This level is never stored, however; it is only used - * in comparison and to let SuperAdmins win from founders where needed - */ -#define ACCESS_SUPERADMIN 10001 - -/* Levels for xOP */ - -#define ACCESS_VOP 3 -#define ACCESS_HOP 4 -#define ACCESS_AOP 5 -#define ACCESS_SOP 10 +}; /* AutoKick data. */ typedef struct { |
