]>
jfr.im git - irc/quakenet/newserv.git/blob - helpmod2/hchannel.h
1 /* new H channel entries */
7 #include "../channel/channel.h"
21 H_JOINFLOOD_PROTECTION
= 1 << 2,
24 H_QUEUE_SPAMMY
= 1 << 4,
25 H_QUEUE_MAINTAIN
= 1 << 5,
29 H_LAMER_CONTROL
= 1 << 8,
31 H_MAINTAIN_M
= 1 << 10,
32 H_MAINTAIN_I
= 1 << 11,
34 H_HANDLE_TOPIC
= 1 << 12,
36 H_TROJAN_REMOVAL
= 1 << 14,
37 H_CHANNEL_COMMANDS
= 1 << 15,
39 H_OPER_ONLY
= 1 << 16,
40 H_DISALLOW_LAME_TEXT
= 1 << 17,
41 H_QUEUE_TIMEOUT
= 1 << 18,
42 H_REQUIRE_TICKET
= 1 << 19,
44 H_TICKET_MESSAGE
= 1 << 20,
45 H_HIGHLIGHT_PREVENTION
= 1 << 21,
47 /* the following are not real channel flags, they're used only internally */
50 H_JOIN_FLOOD
= 1 << 30,
51 H_EVERYONEOUT
= 1 << 31
54 #define H_CHANFLAGS_DEFAULT (H_CHANNEL_COMMANDS)
56 #define HCHANNEL_CONF_COUNT 21
58 #define HCHANNEL_WELCOME_LEN 400
60 typedef struct hchannel_struct
62 channel
*real_channel
;
63 char welcome
[HCHANNEL_WELCOME_LEN
];
66 int jf_control
; /* join flood control */
67 hcensor
*censor
; /* censor, keeps the bad words out */
68 int autoqueue
; /* H_QUEUE_MAINTAIN value */
69 int max_idle
; /* automatic idler removal */
71 hterm
*channel_hterms
; /* local terms */
72 struct hchannel_struct
*report_to
; /* where to report this channels statistics */
74 /* this is also the queue, so it's "sorted" */
75 struct hchannel_user_struct
*channel_users
;
78 time_t last_staff_activity
;
81 hlc_profile
*lc_profile
;
83 struct hticket_struct
*htickets
;
84 sstring
*ticket_message
;
86 struct hchannel_struct
*next
;
89 typedef struct hchannel_user_struct
91 struct huser_struct
*husr
;
93 struct hchannel_user_struct
*next
;
96 extern hchannel
*hchannels
;
98 hchannel
*hchannel_add(const char *);
99 int hchannel_del(hchannel
*);
100 void hchannel_del_all(void);
101 hchannel
*hchannel_get_by_channel(channel
*);
102 hchannel
*hchannel_get_by_name(const char *);
103 const char *hchannel_get_name(hchannel
*);
105 hchannel_user
*hchannel_on_channel(hchannel
*, struct huser_struct
*);
106 hchannel_user
*hchannel_add_user(hchannel
*, struct huser_struct
*);
107 hchannel_user
*hchannel_del_user(hchannel
*, struct huser_struct
*);
109 int hchannel_authority(hchannel
*, struct huser_struct
*);
111 /* returns the setting state for a channel, the int is the flag, not 1 << parameter */
112 const char *hchannel_get_state(hchannel
*, int);
113 /* returns a setting name */
114 const char *hchannel_get_sname(int);
115 void hchannel_conf_change(hchannel
*, int);
116 void hchannel_mode_check(hchannel
*);
118 void hchannel_remove_inactive_users(void);
119 void hchannel_report(void);
121 void hchannel_set_topic(hchannel
*);
123 /*int hchannel_on_queue(hchannel *, struct huser_struct *);*/
124 int hchannels_on_queue(struct huser_struct
*);
125 int hchannels_on_desk(struct huser_struct
*);
127 int hchannel_count_users(hchannel
*, hlevel
);
128 int hchannel_count_queue(hchannel
*);
130 void hchannels_dnmo(struct huser_struct
*);
132 int hchannel_is_valid(hchannel
*);
134 /* somewhat of a hack, but channels have to be loaded before accounts */
135 void hchannels_match_accounts(void);
137 int hchannel_count(void);
139 int hchannel_highlight_detection(hchannel
*, const char *);
141 void hchannel_activate_join_flood(hchannel
*);
142 /* goes to schedule */
143 void hchannel_deactivate_join_flood();