/*
- * charybdis: an advanced ircd.
+ * Solanum: a slightly advanced ircd
* privilege.h: Dynamic privileges API.
*
* Copyright (c) 2008 William Pitcock <nenolod@dereferenced.org>
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __CHARYBDIS_PRIVILEGE_H
-#define __CHARYBDIS_PRIVILEGE_H
+#ifndef __SOLANUM_PRIVILEGE_H
+#define __SOLANUM_PRIVILEGE_H
#include "stdinc.h"
-typedef enum {
+enum {
PRIV_NEEDOPER = 1
-} PrivilegeFlags;
+};
+typedef unsigned int PrivilegeFlags;
struct PrivilegeSet {
+ unsigned int status; /* If CONF_ILLEGAL, delete when no refs */
int refs;
char *name;
char *privs;
struct PrivilegeSet *privilegeset_set_new(const char *name, const char *privs, PrivilegeFlags flags);
struct PrivilegeSet *privilegeset_extend(struct PrivilegeSet *parent, const char *name, const char *privs, PrivilegeFlags flags);
struct PrivilegeSet *privilegeset_get(const char *name);
-void privilegeset_ref(struct PrivilegeSet *set);
+struct PrivilegeSet *privilegeset_ref(struct PrivilegeSet *set);
void privilegeset_unref(struct PrivilegeSet *set);
+void privilegeset_mark_all_illegal(void);
+void privilegeset_delete_all_illegal(void);
+void privilegeset_report(struct Client *source_p);
#endif