Go to the source code of this file.
Data Structures | |
struct | udef_chans |
struct | udef_struct |
Defines | |
#define | UDEF_FLAG 1 |
#define | UDEF_INT 2 |
#define | UDEF_STR 3 |
#define | MASKREASON_MAX 307 |
#define | MASKREASON_LEN (MASKREASON_MAX + 1) |
#define | CHAN_RESETMODES 0x01 |
#define | CHAN_RESETWHO 0x02 |
#define | CHAN_RESETTOPIC 0x04 |
#define | CHAN_RESETBANS 0x08 |
#define | CHAN_RESETEXEMPTS 0x10 |
#define | CHAN_RESETINVITED 0x20 |
#define | CHAN_RESETALL 0x3F |
#define | isbanned(chan, user) ismasked((chan)->channel.ban, user) |
#define | isexempted(chan, user) ismasked((chan)->channel.exempt, user) |
#define | isinvited(chan, user) ismasked((chan)->channel.invite, user) |
#define | ischanban(chan, user) ismodeline((chan)->channel.ban, user) |
#define | ischanexempt(chan, user) ismodeline((chan)->channel.exempt, user) |
#define | ischaninvite(chan, user) ismodeline((chan)->channel.invite, user) |
#define | u_setsticky_ban(chan, host, sticky) u_setsticky_mask(chan, ((struct chanset_t *)chan) ? ((struct chanset_t *)chan)->bans : global_bans, host, sticky, "s") |
#define | u_setsticky_exempt(chan, host, sticky) u_setsticky_mask(chan, ((struct chanset_t *)chan) ? ((struct chanset_t *)chan)->exempts : global_exempts, host, sticky, "se") |
#define | u_setsticky_invite(chan, host, sticky) u_setsticky_mask(chan, ((struct chanset_t *)chan) ? ((struct chanset_t *)chan)->invites : global_invites, host, sticky, "sInv") |
#define | CHKFLAG_POS(x, y, z) |
#define | CHKFLAG_NEG(x, y, z) |
Functions | |
static void | del_chanrec (struct userrec *u, char *) |
static struct chanuserrec * | get_chanrec (struct userrec *u, char *chname) |
static struct chanuserrec * | add_chanrec (struct userrec *u, char *chname) |
static void | add_chanrec_by_handle (struct userrec *bu, char *hand, char *chname) |
static void | get_handle_chaninfo (char *handle, char *chname, char *s) |
static void | set_handle_chaninfo (struct userrec *bu, char *handle, char *chname, char *info) |
static void | set_handle_laston (char *chan, struct userrec *u, time_t n) |
static int | u_sticky_mask (maskrec *u, char *uhost) |
static int | u_setsticky_mask (struct chanset_t *chan, maskrec *m, char *uhost, int sticky, char *botcmd) |
static int | u_equals_mask (maskrec *u, char *uhost) |
static int | u_match_mask (struct maskrec *rec, char *mask) |
static int | u_delexempt (struct chanset_t *c, char *who, int doit) |
static int | u_addexempt (struct chanset_t *chan, char *exempt, char *from, char *note, time_t expire_time, int flags) |
static int | u_delinvite (struct chanset_t *c, char *who, int doit) |
static int | u_addinvite (struct chanset_t *chan, char *invite, char *from, char *note, time_t expire_time, int flags) |
static int | u_delban (struct chanset_t *c, char *who, int doit) |
static int | u_addban (struct chanset_t *chan, char *ban, char *from, char *note, time_t expire_time, int flags) |
static void | tell_bans (int idx, int show_inact, char *match) |
static int | write_bans (FILE *f, int idx) |
static void | check_expired_bans (void) |
static void | tell_exempts (int idx, int show_inact, char *match) |
static int | write_exempts (FILE *f, int idx) |
static void | check_expired_exempts (void) |
static void | tell_invites (int idx, int show_inact, char *match) |
static int | write_invites (FILE *f, int idx) |
static void | check_expired_invites (void) |
static void | write_channels (void) |
static void | read_channels (int, int) |
static void | clear_channel (struct chanset_t *, int) |
static void | get_mode_protect (struct chanset_t *chan, char *s) |
static void | set_mode_protect (struct chanset_t *chan, char *set) |
static int | ismasked (masklist *m, char *user) |
static int | ismodeline (masklist *m, char *user) |
static int | tcl_channel_modify (Tcl_Interp *irp, struct chanset_t *chan, int items, char **item) |
static int | tcl_channel_add (Tcl_Interp *irp, char *, char *) |
static char * | convert_element (char *src, char *dst) |
static int | expmem_udef (struct udef_struct *) |
static int | expmem_udef_chans (int, struct udef_chans *) |
static void | free_udef (struct udef_struct *) |
static void | free_udef_chans (struct udef_chans *, int) |
static intptr_t | getudef (struct udef_chans *, char *) |
static void | initudef (int type, char *, int) |
static void | setudef (struct udef_struct *, char *, intptr_t) |
static void | remove_channel (struct chanset_t *) |
static intptr_t | ngetudef (char *, char *) |
static int | expired_mask (struct chanset_t *chan, char *who) |
static int | chanset_unlink (struct chanset_t *chan) |
#define CHAN_RESETALL 0x3F |
Definition at line 43 of file channels.h.
Referenced by cmd_reset(), gotjoin(), gotpart(), and msg_reset().
#define CHAN_RESETBANS 0x08 |
Definition at line 40 of file channels.h.
Referenced by reset_chan_info().
#define CHAN_RESETEXEMPTS 0x10 |
Definition at line 41 of file channels.h.
Referenced by recheck_channel(), and reset_chan_info().
#define CHAN_RESETINVITED 0x20 |
Definition at line 42 of file channels.h.
Referenced by recheck_channel(), and reset_chan_info().
#define CHAN_RESETMODES 0x01 |
Definition at line 37 of file channels.h.
Referenced by reset_chan_info().
#define CHAN_RESETTOPIC 0x04 |
Definition at line 39 of file channels.h.
Referenced by gotjoin(), and reset_chan_info().
#define CHAN_RESETWHO 0x02 |
Definition at line 38 of file channels.h.
Referenced by reset_chan_info().
#define CHKFLAG_NEG | ( | x, | |||
y, | |||||
z | ) |
(!strcmp(setting, y)) { \ if (z & x) \ simple_sprintf(s, "%d", 0); \ else \ simple_sprintf(s, "%d", 1); \ }
Definition at line 208 of file channels.h.
#define CHKFLAG_POS | ( | x, | |||
y, | |||||
z | ) |
(!strcmp(setting, y)) { \ if (z & x) \ simple_sprintf(s, "%d", 1); \ else \ simple_sprintf(s, "%d", 0); \ }
Definition at line 201 of file channels.h.
Definition at line 189 of file channels.h.
Referenced by check_this_ban(), detect_chan_flood(), and recheck_bans().
Definition at line 193 of file channels.h.
Referenced by display_ban(), and real_add_mode().
Definition at line 194 of file channels.h.
Referenced by display_exempt(), and real_add_mode().
Definition at line 195 of file channels.h.
Referenced by display_invite(), and real_add_mode().
Definition at line 190 of file channels.h.
Referenced by enforce_bans(), got_ban(), gotjoin(), kick_all(), recheck_exempts(), and refresh_exempt().
Definition at line 191 of file channels.h.
Referenced by recheck_invites(), and refresh_invite().
#define MASKREASON_LEN (MASKREASON_MAX + 1) |
Definition at line 34 of file channels.h.
#define MASKREASON_MAX 307 |
Definition at line 33 of file channels.h.
Referenced by cmd_pls_ban(), cmd_pls_exempt(), and cmd_pls_invite().
#define u_setsticky_ban | ( | chan, | |||
host, | |||||
sticky | ) | u_setsticky_mask(chan, ((struct chanset_t *)chan) ? ((struct chanset_t *)chan)->bans : global_bans, host, sticky, "s") |
Definition at line 197 of file channels.h.
Referenced by cmd_stick_yn(), and share_stick_ban().
#define u_setsticky_exempt | ( | chan, | |||
host, | |||||
sticky | ) | u_setsticky_mask(chan, ((struct chanset_t *)chan) ? ((struct chanset_t *)chan)->exempts : global_exempts, host, sticky, "se") |
Definition at line 198 of file channels.h.
Referenced by cmd_stick_yn(), and share_stick_exempt().
#define u_setsticky_invite | ( | chan, | |||
host, | |||||
sticky | ) | u_setsticky_mask(chan, ((struct chanset_t *)chan) ? ((struct chanset_t *)chan)->invites : global_invites, host, sticky, "sInv") |
Definition at line 199 of file channels.h.
Referenced by cmd_stick_yn(), and share_stick_invite().
#define UDEF_FLAG 1 |
Definition at line 29 of file channels.h.
Referenced by cmd_chaninfo(), and write_channels().
#define UDEF_INT 2 |
Definition at line 30 of file channels.h.
Referenced by cmd_chaninfo(), and write_channels().
#define UDEF_STR 3 |
Definition at line 31 of file channels.h.
Referenced by cmd_chaninfo(), expmem_udef_chans(), free_udef_chans(), and write_channels().
static struct chanuserrec* add_chanrec | ( | struct userrec * | u, | |
char * | chname | |||
) | [static, read] |
Referenced by cmd_pls_chrec(), dup_userlist(), and share_pls_chrec().
static void add_chanrec_by_handle | ( | struct userrec * | bu, | |
char * | hand, | |||
char * | chname | |||
) | [static] |
static int chanset_unlink | ( | struct chanset_t * | chan | ) | [inline, static] |
static void check_expired_bans | ( | void | ) | [static] |
static void check_expired_exempts | ( | void | ) | [static] |
static void check_expired_invites | ( | void | ) | [static] |
static void clear_channel | ( | struct chanset_t * | , | |
int | ||||
) | [static] |
Referenced by got315(), gotkick(), gotpart(), irc_close(), remove_channel(), and reset_chan_info().
static char* convert_element | ( | char * | src, | |
char * | dst | |||
) | [static] |
static void del_chanrec | ( | struct userrec * | u, | |
char * | ||||
) | [static] |
Referenced by cmd_mns_chrec(), finish_share(), and share_mns_chrec().
static int expired_mask | ( | struct chanset_t * | chan, | |
char * | who | |||
) | [static] |
static int expmem_udef | ( | struct udef_struct * | ) | [static] |
static int expmem_udef_chans | ( | int | , | |
struct udef_chans * | ||||
) | [static] |
static void free_udef | ( | struct udef_struct * | ) | [static] |
static void free_udef_chans | ( | struct udef_chans * | , | |
int | ||||
) | [static] |
static struct chanuserrec* get_chanrec | ( | struct userrec * | u, | |
char * | chname | |||
) | [static, read] |
Definition at line 25 of file userchan.c.
References chanuserrec::channel, userrec::chanrec, chanuserrec::next, NULL, and rfc_casecmp.
Referenced by add_chanrec_by_handle(), cmd_mns_chrec(), cmd_pls_chrec(), get_handle_chaninfo(), gotjoin(), msg_whois(), set_handle_chaninfo(), set_handle_laston(), share_pls_chrec(), share_stick_ban(), share_stick_exempt(), and share_stick_invite().
00026 { 00027 struct chanuserrec *ch; 00028 00029 for (ch = u->chanrec; ch; ch = ch->next) 00030 if (!rfc_casecmp(ch->channel, chname)) 00031 return ch; 00032 return NULL; 00033 }
static void get_handle_chaninfo | ( | char * | handle, | |
char * | chname, | |||
char * | s | |||
) | [static] |
Referenced by cmd_info(), gotjoin(), msg_info(), and msg_who().
static void get_mode_protect | ( | struct chanset_t * | chan, | |
char * | s | |||
) | [static] |
static intptr_t getudef | ( | struct udef_chans * | , | |
char * | ||||
) | [static] |
static void initudef | ( | int | type, | |
char * | , | |||
int | ||||
) | [static] |
static int ismasked | ( | masklist * | m, | |
char * | user | |||
) | [static] |
static int ismodeline | ( | masklist * | m, | |
char * | user | |||
) | [static] |
static intptr_t ngetudef | ( | char * | , | |
char * | ||||
) | [static] |
static void read_channels | ( | int | , | |
int | ||||
) | [static] |
static void remove_channel | ( | struct chanset_t * | ) | [static] |
static void set_handle_chaninfo | ( | struct userrec * | bu, | |
char * | handle, | |||
char * | chname, | |||
char * | info | |||
) | [static] |
Referenced by cmd_chinfo(), cmd_info(), dup_userlist(), msg_info(), and share_chchinfo().
static void set_mode_protect | ( | struct chanset_t * | chan, | |
char * | set | |||
) | [static] |
static void setudef | ( | struct udef_struct * | , | |
char * | , | |||
intptr_t | ||||
) | [static] |
static int tcl_channel_add | ( | Tcl_Interp * | irp, | |
char * | , | |||
char * | ||||
) | [static] |
static int tcl_channel_modify | ( | Tcl_Interp * | irp, | |
struct chanset_t * | chan, | |||
int | items, | |||
char ** | item | |||
) | [static] |
static void tell_bans | ( | int | idx, | |
int | show_inact, | |||
char * | match | |||
) | [static] |
static void tell_exempts | ( | int | idx, | |
int | show_inact, | |||
char * | match | |||
) | [static] |
static void tell_invites | ( | int | idx, | |
int | show_inact, | |||
char * | match | |||
) | [static] |
static int u_addban | ( | struct chanset_t * | chan, | |
char * | ban, | |||
char * | from, | |||
char * | note, | |||
time_t | expire_time, | |||
int | flags | |||
) | [static] |
Referenced by cmd_kickban(), cmd_pls_ban(), detect_chan_flood(), gotmsg(), gotnotice(), punish_badguy(), share_pls_ban(), and share_pls_banchan().
static int u_addexempt | ( | struct chanset_t * | chan, | |
char * | exempt, | |||
char * | from, | |||
char * | note, | |||
time_t | expire_time, | |||
int | flags | |||
) | [static] |
Referenced by cmd_pls_exempt(), share_pls_exempt(), and share_pls_exemptchan().
static int u_addinvite | ( | struct chanset_t * | chan, | |
char * | invite, | |||
char * | from, | |||
char * | note, | |||
time_t | expire_time, | |||
int | flags | |||
) | [static] |
Referenced by cmd_pls_invite(), share_pls_invite(), and share_pls_invitechan().
static int u_delban | ( | struct chanset_t * | c, | |
char * | who, | |||
int | doit | |||
) | [static] |
Referenced by cmd_mns_ban(), finish_share(), remove_channel(), share_mns_ban(), and share_mns_banchan().
static int u_delexempt | ( | struct chanset_t * | c, | |
char * | who, | |||
int | doit | |||
) | [static] |
Referenced by cmd_mns_exempt(), finish_share(), remove_channel(), share_mns_exempt(), and share_mns_exemptchan().
static int u_delinvite | ( | struct chanset_t * | c, | |
char * | who, | |||
int | doit | |||
) | [static] |
Referenced by cmd_mns_invite(), finish_share(), remove_channel(), share_mns_invite(), and share_mns_invitechan().
static int u_equals_mask | ( | maskrec * | u, | |
char * | uhost | |||
) | [static] |
Referenced by cmd_mns_ban(), cmd_mns_exempt(), cmd_mns_invite(), got_ban(), got_exempt(), got_invite(), got_unban(), got_unexempt(), got_uninvite(), and resetmasks().
static int u_match_mask | ( | struct maskrec * | rec, | |
char * | mask | |||
) | [static] |
Referenced by check_this_ban(), check_this_member(), cmd_kickban(), detect_chan_flood(), gotjoin(), gotmsg(), gotnotice(), kick_all(), and msg_hello().
static int u_setsticky_mask | ( | struct chanset_t * | chan, | |
maskrec * | m, | |||
char * | uhost, | |||
int | sticky, | |||
char * | botcmd | |||
) | [static] |
static int u_sticky_mask | ( | maskrec * | u, | |
char * | uhost | |||
) | [static] |
Referenced by check_expired_chanstuff(), got_unban(), got_unexempt(), and got_uninvite().
static int write_bans | ( | FILE * | f, | |
int | idx | |||
) | [static] |
static void write_channels | ( | void | ) | [static] |
static int write_exempts | ( | FILE * | f, | |
int | idx | |||
) | [static] |
static int write_invites | ( | FILE * | f, | |
int | idx | |||
) | [static] |