| 1 |
/* |
| 2 |
* Copyright (c) 2005-2009 Atheme Development Group |
| 3 |
* Rights to this code are as documented in doc/LICENSE. |
| 4 |
* |
| 5 |
* Data structures for account information. |
| 6 |
* |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef ACCOUNT_H |
| 10 |
#define ACCOUNT_H |
| 11 |
|
| 12 |
#include "entity.h" |
| 13 |
|
| 14 |
typedef struct mycertfp_ mycertfp_t; |
| 15 |
typedef struct myuser_name_ myuser_name_t; |
| 16 |
typedef struct chanacs_ chanacs_t; |
| 17 |
typedef struct kline_ kline_t; |
| 18 |
typedef struct xline_ xline_t; |
| 19 |
typedef struct qline_ qline_t; |
| 20 |
typedef struct mymemo_ mymemo_t; |
| 21 |
typedef struct svsignore_ svsignore_t; |
| 22 |
|
| 23 |
/* kline list struct */ |
| 24 |
struct kline_ { |
| 25 |
char *user; |
| 26 |
char *host; |
| 27 |
char *reason; |
| 28 |
char *setby; |
| 29 |
|
| 30 |
unsigned long number; |
| 31 |
long duration; |
| 32 |
time_t settime; |
| 33 |
time_t expires; |
| 34 |
}; |
| 35 |
|
| 36 |
/* xline list struct */ |
| 37 |
struct xline_ { |
| 38 |
char *realname; |
| 39 |
char *reason; |
| 40 |
char *setby; |
| 41 |
|
| 42 |
unsigned int number; |
| 43 |
long duration; |
| 44 |
time_t settime; |
| 45 |
time_t expires; |
| 46 |
}; |
| 47 |
|
| 48 |
/* qline list struct */ |
| 49 |
struct qline_ { |
| 50 |
char *mask; |
| 51 |
char *reason; |
| 52 |
char *setby; |
| 53 |
|
| 54 |
unsigned int number; |
| 55 |
long duration; |
| 56 |
time_t settime; |
| 57 |
time_t expires; |
| 58 |
}; |
| 59 |
|
| 60 |
/* services ignore struct */ |
| 61 |
struct svsignore_ { |
| 62 |
svsignore_t *svsignore; |
| 63 |
|
| 64 |
char *mask; |
| 65 |
time_t settime; |
| 66 |
char *setby; |
| 67 |
char *reason; |
| 68 |
}; |
| 69 |
|
| 70 |
/* services accounts */ |
| 71 |
struct myuser_ |
| 72 |
{ |
| 73 |
myentity_t ent; |
| 74 |
char pass[PASSLEN]; |
| 75 |
|
| 76 |
stringref email; |
| 77 |
stringref email_canonical; |
| 78 |
|
| 79 |
mowgli_list_t logins; /* user_t's currently logged in to this */ |
| 80 |
time_t registered; |
| 81 |
time_t lastlogin; |
| 82 |
|
| 83 |
soper_t *soper; |
| 84 |
|
| 85 |
unsigned int flags; |
| 86 |
|
| 87 |
mowgli_list_t memos; /* store memos */ |
| 88 |
unsigned short memoct_new; |
| 89 |
unsigned short memo_ratelimit_num; /* memos sent recently */ |
| 90 |
time_t memo_ratelimit_time; /* last time a memo was sent */ |
| 91 |
mowgli_list_t memo_ignores; |
| 92 |
|
| 93 |
mowgli_list_t access_list; |
| 94 |
mowgli_list_t nicks; /* registered nicks, must include mu->name if nonempty */ |
| 95 |
|
| 96 |
language_t *language; |
| 97 |
|
| 98 |
mowgli_list_t cert_fingerprints; |
| 99 |
}; |
| 100 |
|
| 101 |
/* Keep this synchronized with mu_flags in libathemecore/flags.c */ |
| 102 |
#define MU_HOLD 0x00000001 |
| 103 |
#define MU_NEVEROP 0x00000002 |
| 104 |
#define MU_NOOP 0x00000004 |
| 105 |
#define MU_WAITAUTH 0x00000008 |
| 106 |
#define MU_HIDEMAIL 0x00000010 |
| 107 |
#define MU_NOMEMO 0x00000040 |
| 108 |
#define MU_EMAILMEMOS 0x00000080 |
| 109 |
#define MU_CRYPTPASS 0x00000100 |
| 110 |
#define MU_NOBURSTLOGIN 0x00000400 |
| 111 |
#define MU_ENFORCE 0x00000800 /* XXX limited use at this time */ |
| 112 |
#define MU_USE_PRIVMSG 0x00001000 /* use PRIVMSG */ |
| 113 |
#define MU_PRIVATE 0x00002000 |
| 114 |
#define MU_QUIETCHG 0x00004000 |
| 115 |
#define MU_NOGREET 0x00008000 |
| 116 |
#define MU_REGNOLIMIT 0x00010000 |
| 117 |
#define MU_NEVERGROUP 0x00020000 |
| 118 |
#define MU_PENDINGLOGIN 0x00040000 |
| 119 |
#define MU_NOPASSWORD 0x00080000 |
| 120 |
|
| 121 |
/* memoserv rate limiting parameters */ |
| 122 |
#define MEMO_MAX_NUM 5 |
| 123 |
#define MEMO_MAX_TIME 180 |
| 124 |
|
| 125 |
/* registered nick */ |
| 126 |
struct mynick_ |
| 127 |
{ |
| 128 |
object_t parent; |
| 129 |
|
| 130 |
char nick[NICKLEN]; |
| 131 |
|
| 132 |
myuser_t *owner; |
| 133 |
|
| 134 |
time_t registered; |
| 135 |
time_t lastseen; |
| 136 |
|
| 137 |
mowgli_node_t node; /* for myuser_t.nicks */ |
| 138 |
}; |
| 139 |
|
| 140 |
/* record about a name that used to exist */ |
| 141 |
struct myuser_name_ |
| 142 |
{ |
| 143 |
object_t parent; |
| 144 |
|
| 145 |
char name[NICKLEN]; |
| 146 |
}; |
| 147 |
|
| 148 |
struct mycertfp_ |
| 149 |
{ |
| 150 |
myuser_t *mu; |
| 151 |
|
| 152 |
char *certfp; |
| 153 |
|
| 154 |
mowgli_node_t node; |
| 155 |
}; |
| 156 |
|
| 157 |
struct mychan_ |
| 158 |
{ |
| 159 |
object_t parent; |
| 160 |
|
| 161 |
stringref name; |
| 162 |
|
| 163 |
channel_t *chan; |
| 164 |
mowgli_list_t chanacs; |
| 165 |
time_t registered; |
| 166 |
time_t used; |
| 167 |
|
| 168 |
unsigned int mlock_on; |
| 169 |
unsigned int mlock_off; |
| 170 |
unsigned int mlock_limit; |
| 171 |
char *mlock_key; |
| 172 |
|
| 173 |
unsigned int flags; |
| 174 |
}; |
| 175 |
|
| 176 |
/* Keep this synchronized with mc_flags in libathemecore/flags.c */ |
| 177 |
#define MC_HOLD 0x00000001 |
| 178 |
#define MC_NOOP 0x00000002 |
| 179 |
#define MC_LIMITFLAGS 0x00000004 |
| 180 |
#define MC_SECURE 0x00000008 |
| 181 |
#define MC_VERBOSE 0x00000010 |
| 182 |
#define MC_RESTRICTED 0x00000020 |
| 183 |
#define MC_KEEPTOPIC 0x00000040 |
| 184 |
#define MC_VERBOSE_OPS 0x00000080 |
| 185 |
#define MC_TOPICLOCK 0x00000100 |
| 186 |
#define MC_GUARD 0x00000200 |
| 187 |
#define MC_PRIVATE 0x00000400 |
| 188 |
#define MC_NOSYNC 0x00000800 |
| 189 |
#define MC_ANTIFLOOD 0x00001000 |
| 190 |
#define MC_PUBACL 0x00002000 |
| 191 |
|
| 192 |
/* The following are temporary state */ |
| 193 |
#define MC_INHABIT 0x80000000 /* we're on channel to enforce akick/staffonly/close */ |
| 194 |
#define MC_MLOCK_CHECK 0x40000000 /* we need to check mode locks */ |
| 195 |
#define MC_FORCEVERBOSE 0x20000000 /* fantasy cmd in progress, be verbose */ |
| 196 |
#define MC_RECREATED 0x10000000 /* created with new channelTS */ |
| 197 |
|
| 198 |
#define MC_VERBOSE_MASK (MC_VERBOSE | MC_VERBOSE_OPS) |
| 199 |
|
| 200 |
/* struct for channel access list */ |
| 201 |
struct chanacs_ |
| 202 |
{ |
| 203 |
object_t parent; |
| 204 |
|
| 205 |
myentity_t *entity; |
| 206 |
mychan_t *mychan; |
| 207 |
char *host; |
| 208 |
unsigned int level; |
| 209 |
time_t tmodified; |
| 210 |
|
| 211 |
mowgli_node_t cnode; |
| 212 |
mowgli_node_t unode; |
| 213 |
|
| 214 |
stringref setter; |
| 215 |
}; |
| 216 |
|
| 217 |
/* the new atheme-style channel flags */ |
| 218 |
#define CA_VOICE 0x00000001 /* Ability to use voice/devoice command. */ |
| 219 |
#define CA_AUTOVOICE 0x00000002 /* Gain voice automatically upon entry. */ |
| 220 |
#define CA_OP 0x00000004 /* Ability to use op/deop command. */ |
| 221 |
#define CA_AUTOOP 0x00000008 /* Gain ops automatically upon entry. */ |
| 222 |
#define CA_TOPIC 0x00000010 /* Ability to use /msg X topic */ |
| 223 |
#define CA_SET 0x00000020 /* Ability to use /msg X set */ |
| 224 |
#define CA_REMOVE 0x00000040 /* Ability to use /msg X kick */ |
| 225 |
#define CA_INVITE 0x00000080 /* Ability to use /msg X invite */ |
| 226 |
#define CA_RECOVER 0x00000100 /* Ability to use /msg X recover */ |
| 227 |
#define CA_FLAGS 0x00000200 /* Ability to write to channel flags table */ |
| 228 |
#define CA_HALFOP 0x00000400 /* Ability to use /msg X halfop */ |
| 229 |
#define CA_AUTOHALFOP 0x00000800 /* Gain halfops automatically upon entry. */ |
| 230 |
#define CA_ACLVIEW 0x00001000 /* Can view access lists */ |
| 231 |
#define CA_FOUNDER 0x00002000 /* Is a channel founder */ |
| 232 |
#define CA_USEPROTECT 0x00004000 /* Ability to use /msg X protect */ |
| 233 |
#define CA_USEOWNER 0x00008000 /* Ability to use /msg X owner */ |
| 234 |
#define CA_EXEMPT 0x00010000 /* Exempt from akick, can use /msg X unban on self */ |
| 235 |
|
| 236 |
/*#define CA_SUSPENDED 0x40000000 * Suspended access entry (not yet implemented) */ |
| 237 |
#define CA_AKICK 0x80000000 /* Automatic kick */ |
| 238 |
|
| 239 |
#define CA_NONE 0x0 |
| 240 |
|
| 241 |
/* xOP defaults, compatible with Atheme 0.3 */ |
| 242 |
#define CA_VOP_DEF (CA_VOICE | CA_AUTOVOICE | CA_ACLVIEW) |
| 243 |
#define CA_HOP_DEF (CA_VOICE | CA_HALFOP | CA_AUTOHALFOP | CA_TOPIC | CA_ACLVIEW) |
| 244 |
#define CA_AOP_DEF (CA_VOICE | CA_HALFOP | CA_OP | CA_AUTOOP | CA_TOPIC | CA_ACLVIEW) |
| 245 |
#define CA_SOP_DEF (CA_AOP_DEF | CA_SET | CA_REMOVE | CA_INVITE | CA_EXEMPT) |
| 246 |
|
| 247 |
/* special values for founder/successor -- jilles */ |
| 248 |
/* used in shrike flatfile conversion: */ |
| 249 |
#define CA_SUCCESSOR_0 (CA_VOICE | CA_OP | CA_AUTOOP | CA_TOPIC | CA_SET | CA_REMOVE | CA_INVITE | CA_RECOVER | CA_FLAGS | CA_HALFOP | CA_ACLVIEW | CA_USEPROTECT | CA_EXEMPT) |
| 250 |
/* granted to new founder on transfer etc: */ |
| 251 |
#define CA_FOUNDER_0 (CA_SUCCESSOR_0 | CA_FLAGS | CA_USEOWNER | CA_FOUNDER) |
| 252 |
/* granted to founder on new channel: */ |
| 253 |
#define CA_INITIAL (CA_FOUNDER_0 | CA_AUTOOP) |
| 254 |
|
| 255 |
/* joining with one of these flags updates used time */ |
| 256 |
#define CA_USEDUPDATE (CA_VOICE | CA_OP | CA_AUTOOP | CA_SET | CA_REMOVE | CA_RECOVER | CA_FLAGS | CA_HALFOP | CA_AUTOHALFOP | CA_FOUNDER | CA_USEPROTECT | CA_USEOWNER) |
| 257 |
/* "high" privs (for MC_LIMITFLAGS) */ |
| 258 |
#define CA_HIGHPRIVS (CA_SET | CA_RECOVER | CA_FLAGS) |
| 259 |
#define CA_ALLPRIVS (CA_VOICE | CA_AUTOVOICE | CA_OP | CA_AUTOOP | CA_TOPIC | CA_SET | CA_REMOVE | CA_INVITE | CA_RECOVER | CA_FLAGS | CA_HALFOP | CA_AUTOHALFOP | CA_ACLVIEW | CA_FOUNDER | CA_USEPROTECT | CA_USEOWNER | CA_EXEMPT) |
| 260 |
#define CA_ALL_ALL (CA_ALLPRIVS | CA_AKICK) |
| 261 |
|
| 262 |
/* old CA_ flags */ |
| 263 |
#define OLD_CA_AOP (CA_VOICE | CA_OP | CA_AUTOOP | CA_TOPIC) |
| 264 |
|
| 265 |
/* shrike CA_ flags */ |
| 266 |
#define SHRIKE_CA_VOP 0x00000002 |
| 267 |
#define SHRIKE_CA_AOP 0x00000004 |
| 268 |
#define SHRIKE_CA_SOP 0x00000008 |
| 269 |
#define SHRIKE_CA_FOUNDER 0x00000010 |
| 270 |
#define SHRIKE_CA_SUCCESSOR 0x00000020 |
| 271 |
|
| 272 |
/* struct for account memos */ |
| 273 |
struct mymemo_ { |
| 274 |
char sender[NICKLEN]; |
| 275 |
char text[MEMOLEN]; |
| 276 |
time_t sent; |
| 277 |
unsigned int status; |
| 278 |
}; |
| 279 |
|
| 280 |
/* memo status flags */ |
| 281 |
#define MEMO_READ 0x00000001 |
| 282 |
#define MEMO_CHANNEL 0x00000002 |
| 283 |
|
| 284 |
/* account related hooks */ |
| 285 |
typedef struct { |
| 286 |
mychan_t *mc; |
| 287 |
sourceinfo_t *si; |
| 288 |
} hook_channel_req_t; |
| 289 |
|
| 290 |
typedef struct { |
| 291 |
chanacs_t *ca; |
| 292 |
sourceinfo_t *si; |
| 293 |
myentity_t *parent; |
| 294 |
unsigned int oldlevel; |
| 295 |
unsigned int newlevel; |
| 296 |
int approved; |
| 297 |
} hook_channel_acl_req_t; |
| 298 |
|
| 299 |
typedef struct { |
| 300 |
mychan_t *mc; |
| 301 |
myuser_t *mu; |
| 302 |
} hook_channel_succession_req_t; |
| 303 |
|
| 304 |
typedef struct { |
| 305 |
union { |
| 306 |
mychan_t *mc; |
| 307 |
myuser_t *mu; |
| 308 |
mynick_t *mn; |
| 309 |
} data; |
| 310 |
int do_expire; /* Write zero here to disallow expiry */ |
| 311 |
} hook_expiry_req_t; |
| 312 |
|
| 313 |
typedef struct { |
| 314 |
sourceinfo_t *si; |
| 315 |
const char *name; |
| 316 |
channel_t *chan; |
| 317 |
int approved; /* Write non-zero here to disallow the registration */ |
| 318 |
} hook_channel_register_check_t; |
| 319 |
|
| 320 |
typedef struct { |
| 321 |
sourceinfo_t *si; |
| 322 |
myuser_t *mu; |
| 323 |
mynick_t *mn; |
| 324 |
} hook_user_req_t; |
| 325 |
|
| 326 |
typedef struct { |
| 327 |
sourceinfo_t *si; |
| 328 |
const char *account; /* or nick */ |
| 329 |
const char *email; |
| 330 |
const char *password; |
| 331 |
int approved; /* Write non-zero here to disallow the registration */ |
| 332 |
} hook_user_register_check_t; |
| 333 |
|
| 334 |
typedef struct { |
| 335 |
sourceinfo_t *si; |
| 336 |
myuser_t *mu; |
| 337 |
bool allowed; |
| 338 |
} hook_user_login_check_t; |
| 339 |
|
| 340 |
typedef struct { |
| 341 |
user_t *u; |
| 342 |
mynick_t *mn; |
| 343 |
} hook_nick_enforce_t; |
| 344 |
|
| 345 |
typedef struct { |
| 346 |
myuser_t *target; |
| 347 |
const char *name; |
| 348 |
char *value; |
| 349 |
} hook_metadata_change_t; |
| 350 |
|
| 351 |
typedef struct { |
| 352 |
myuser_t *mu; |
| 353 |
const char *oldname; |
| 354 |
} hook_user_rename_t; |
| 355 |
|
| 356 |
typedef struct { |
| 357 |
sourceinfo_t *si; |
| 358 |
const char *nick; |
| 359 |
} hook_info_noexist_req_t; |
| 360 |
|
| 361 |
typedef struct { |
| 362 |
sourceinfo_t *si; |
| 363 |
myuser_t *mu; |
| 364 |
int allowed; |
| 365 |
} hook_user_needforce_t; |
| 366 |
|
| 367 |
/* pmodule.c XXX */ |
| 368 |
E bool backend_loaded; |
| 369 |
|
| 370 |
/* dbhandler.c */ |
| 371 |
E void (*db_save)(void *arg); |
| 372 |
E void (*db_load)(const char *arg); |
| 373 |
|
| 374 |
/* function.c */ |
| 375 |
E bool is_founder(mychan_t *mychan, myentity_t *myuser); |
| 376 |
|
| 377 |
/* node.c */ |
| 378 |
E mowgli_list_t klnlist; |
| 379 |
|
| 380 |
E kline_t *kline_add_with_id(const char *user, const char *host, const char *reason, long duration, const char *setby, unsigned long id); |
| 381 |
E kline_t *kline_add(const char *user, const char *host, const char *reason, long duration, const char *setby); |
| 382 |
E kline_t *kline_add_user(user_t *user, const char *reason, long duration, const char *setby); |
| 383 |
E void kline_delete(kline_t *k); |
| 384 |
E kline_t *kline_find(const char *user, const char *host); |
| 385 |
E kline_t *kline_find_num(unsigned long number); |
| 386 |
E kline_t *kline_find_user(user_t *u); |
| 387 |
E void kline_expire(void *arg); |
| 388 |
|
| 389 |
E mowgli_list_t xlnlist; |
| 390 |
|
| 391 |
E xline_t *xline_add(const char *realname, const char *reason, long duration, const char *setby); |
| 392 |
E void xline_delete(const char *realname); |
| 393 |
E xline_t *xline_find(const char *realname); |
| 394 |
E xline_t *xline_find_num(unsigned int number); |
| 395 |
E xline_t *xline_find_user(user_t *u); |
| 396 |
E void xline_expire(void *arg); |
| 397 |
|
| 398 |
E mowgli_list_t qlnlist; |
| 399 |
|
| 400 |
E qline_t *qline_add(const char *mask, const char *reason, long duration, const char *setby); |
| 401 |
E void qline_delete(const char *mask); |
| 402 |
E qline_t *qline_find(const char *mask); |
| 403 |
E qline_t *qline_find_match(const char *mask); |
| 404 |
E qline_t *qline_find_num(unsigned int number); |
| 405 |
E qline_t *qline_find_user(user_t *u); |
| 406 |
E qline_t *qline_find_channel(channel_t *c); |
| 407 |
E void qline_expire(void *arg); |
| 408 |
|
| 409 |
/* account.c */ |
| 410 |
E mowgli_patricia_t *nicklist; |
| 411 |
E mowgli_patricia_t *oldnameslist; |
| 412 |
E mowgli_patricia_t *mclist; |
| 413 |
|
| 414 |
E void init_accounts(void); |
| 415 |
|
| 416 |
E myuser_t *myuser_add(const char *name, const char *pass, const char *email, unsigned int flags); |
| 417 |
E myuser_t *myuser_add_id(const char *id, const char *name, const char *pass, const char *email, unsigned int flags); |
| 418 |
E void myuser_delete(myuser_t *mu); |
| 419 |
//inline myuser_t *myuser_find(const char *name); |
| 420 |
E void myuser_rename(myuser_t *mu, const char *name); |
| 421 |
E void myuser_set_email(myuser_t *mu, const char *newemail); |
| 422 |
E myuser_t *myuser_find_ext(const char *name); |
| 423 |
E void myuser_notice(const char *from, myuser_t *target, const char *fmt, ...) PRINTFLIKE(3, 4); |
| 424 |
|
| 425 |
E bool myuser_access_verify(user_t *u, myuser_t *mu); |
| 426 |
E bool myuser_access_add(myuser_t *mu, const char *mask); |
| 427 |
E char *myuser_access_find(myuser_t *mu, const char *mask); |
| 428 |
E void myuser_access_delete(myuser_t *mu, const char *mask); |
| 429 |
|
| 430 |
E mynick_t *mynick_add(myuser_t *mu, const char *name); |
| 431 |
E void mynick_delete(mynick_t *mn); |
| 432 |
//inline mynick_t *mynick_find(const char *name); |
| 433 |
|
| 434 |
E myuser_name_t *myuser_name_add(const char *name); |
| 435 |
//inline myuser_name_t *myuser_name_find(const char *name); |
| 436 |
E void myuser_name_remember(const char *name, myuser_t *mu); |
| 437 |
E void myuser_name_restore(const char *name, myuser_t *mu); |
| 438 |
|
| 439 |
E mycertfp_t *mycertfp_add(myuser_t *mu, const char *certfp); |
| 440 |
E void mycertfp_delete(mycertfp_t *mcfp); |
| 441 |
E mycertfp_t *mycertfp_find(const char *certfp); |
| 442 |
|
| 443 |
E mychan_t *mychan_add(char *name); |
| 444 |
//inline mychan_t *mychan_find(const char *name); |
| 445 |
E bool mychan_isused(mychan_t *mc); |
| 446 |
E unsigned int mychan_num_founders(mychan_t *mc); |
| 447 |
E const char *mychan_founder_names(mychan_t *mc); |
| 448 |
E myuser_t *mychan_pick_candidate(mychan_t *mc, unsigned int minlevel); |
| 449 |
E myuser_t *mychan_pick_successor(mychan_t *mc); |
| 450 |
E const char *mychan_get_mlock(mychan_t *mc); |
| 451 |
E const char *mychan_get_sts_mlock(mychan_t *mc); |
| 452 |
|
| 453 |
E chanacs_t *chanacs_add(mychan_t *mychan, myentity_t *myuser, unsigned int level, time_t ts, myentity_t *setter); |
| 454 |
E chanacs_t *chanacs_add_host(mychan_t *mychan, const char *host, unsigned int level, time_t ts, myentity_t *setter); |
| 455 |
|
| 456 |
E chanacs_t *chanacs_find(mychan_t *mychan, myentity_t *myuser, unsigned int level); |
| 457 |
E unsigned int chanacs_entity_flags(mychan_t *mychan, myentity_t *myuser); |
| 458 |
//inline bool chanacs_entity_has_flag(mychan_t *mychan, myentity_t *mt, unsigned int level) |
| 459 |
E chanacs_t *chanacs_find_literal(mychan_t *mychan, myentity_t *myuser, unsigned int level); |
| 460 |
E chanacs_t *chanacs_find_host(mychan_t *mychan, const char *host, unsigned int level); |
| 461 |
E unsigned int chanacs_host_flags(mychan_t *mychan, const char *host); |
| 462 |
E chanacs_t *chanacs_find_host_literal(mychan_t *mychan, const char *host, unsigned int level); |
| 463 |
E chanacs_t *chanacs_find_host_by_user(mychan_t *mychan, user_t *u, unsigned int level); |
| 464 |
E chanacs_t *chanacs_find_by_mask(mychan_t *mychan, const char *mask, unsigned int level); |
| 465 |
E bool chanacs_user_has_flag(mychan_t *mychan, user_t *u, unsigned int level); |
| 466 |
E unsigned int chanacs_user_flags(mychan_t *mychan, user_t *u); |
| 467 |
//inline bool chanacs_source_has_flag(mychan_t *mychan, sourceinfo_t *si, unsigned int level); |
| 468 |
E unsigned int chanacs_source_flags(mychan_t *mychan, sourceinfo_t *si); |
| 469 |
|
| 470 |
E chanacs_t *chanacs_open(mychan_t *mychan, myentity_t *mt, const char *hostmask, bool create, myentity_t *setter); |
| 471 |
//inline void chanacs_close(chanacs_t *ca); |
| 472 |
E bool chanacs_modify(chanacs_t *ca, unsigned int *addflags, unsigned int *removeflags, unsigned int restrictflags); |
| 473 |
E bool chanacs_modify_simple(chanacs_t *ca, unsigned int addflags, unsigned int removeflags); |
| 474 |
|
| 475 |
//inline bool chanacs_is_table_full(chanacs_t *ca); |
| 476 |
|
| 477 |
E bool chanacs_change(mychan_t *mychan, myentity_t *mt, const char *hostmask, unsigned int *addflags, unsigned int *removeflags, unsigned int restrictflags, myentity_t *setter); |
| 478 |
E bool chanacs_change_simple(mychan_t *mychan, myentity_t *mt, const char *hostmask, unsigned int addflags, unsigned int removeflags, myentity_t *setter); |
| 479 |
|
| 480 |
E void expire_check(void *arg); |
| 481 |
/* Check the database for (version) problems common to all backends */ |
| 482 |
E void db_check(void); |
| 483 |
|
| 484 |
/* svsignore.c */ |
| 485 |
E mowgli_list_t svs_ignore_list; |
| 486 |
|
| 487 |
E svsignore_t *svsignore_find(user_t *user); |
| 488 |
E svsignore_t *svsignore_add(const char *mask, const char *reason); |
| 489 |
E void svsignore_delete(svsignore_t *svsignore); |
| 490 |
|
| 491 |
#include "entity-validation.h" |
| 492 |
|
| 493 |
#endif |
| 494 |
|
| 495 |
// vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs ts=8 sw=8 noexpandtab |