| 1 |
/* groupserv_common.h - group services common definitions |
| 2 |
* Copyright (C) 2010 Atheme Development Group |
| 3 |
*/ |
| 4 |
|
| 5 |
#ifndef GROUPSERV_COMMON_H |
| 6 |
#define GROUPSERV_COMMON_H |
| 7 |
|
| 8 |
#include "atheme.h" |
| 9 |
|
| 10 |
typedef struct groupserv_config_ groupserv_config_t; |
| 11 |
|
| 12 |
struct groupserv_config_ { |
| 13 |
unsigned int maxgroups; |
| 14 |
unsigned int maxgroupacs; |
| 15 |
bool enable_open_groups; |
| 16 |
char *join_flags; |
| 17 |
}; |
| 18 |
|
| 19 |
#define MG_REGNOLIMIT 0x00000001 |
| 20 |
#define MG_ACSNOLIMIT 0x00000002 |
| 21 |
#define MG_OPEN 0x00000004 |
| 22 |
#define MG_PUBLIC 0x00000008 |
| 23 |
|
| 24 |
typedef struct mygroup_ mygroup_t; |
| 25 |
|
| 26 |
struct mygroup_ { |
| 27 |
myentity_t ent; |
| 28 |
|
| 29 |
mowgli_list_t acs; |
| 30 |
time_t regtime; |
| 31 |
|
| 32 |
unsigned int flags; |
| 33 |
|
| 34 |
bool visited; |
| 35 |
}; |
| 36 |
|
| 37 |
#define GA_FOUNDER 0x00000001 |
| 38 |
#define GA_FLAGS 0x00000002 |
| 39 |
#define GA_CHANACS 0x00000004 |
| 40 |
#define GA_MEMOS 0x00000008 |
| 41 |
#define GA_SET 0x00000010 |
| 42 |
#define GA_VHOST 0x00000020 |
| 43 |
#define GA_BAN 0x00000040 |
| 44 |
#define GA_INVITE 0x00000080 |
| 45 |
#define GA_ACLVIEW 0x00000100 |
| 46 |
#define GA_ALL (GA_FLAGS | GA_CHANACS | GA_MEMOS | GA_SET | GA_VHOST | GA_INVITE | GA_ACLVIEW) |
| 47 |
#define GA_ALL_OLD (GA_FLAGS | GA_CHANACS | GA_MEMOS | GA_SET | GA_VHOST | GA_INVITE) |
| 48 |
|
| 49 |
#define PRIV_GROUP_ADMIN "group:admin" |
| 50 |
#define PRIV_GROUP_AUSPEX "group:auspex" |
| 51 |
|
| 52 |
typedef struct groupacs_ groupacs_t; |
| 53 |
|
| 54 |
struct groupacs_ { |
| 55 |
object_t parent; |
| 56 |
|
| 57 |
mygroup_t *mg; |
| 58 |
myentity_t *mt; |
| 59 |
unsigned int flags; |
| 60 |
|
| 61 |
mowgli_node_t gnode; |
| 62 |
mowgli_node_t unode; |
| 63 |
}; |
| 64 |
|
| 65 |
#endif /* !GROUPSERV_H */ |