149 |
|
mp_pool_release(member); |
150 |
|
|
151 |
|
if (chptr->members.head == NULL) |
152 |
< |
destroy_channel(chptr); |
152 |
> |
channel_free(chptr); |
153 |
|
} |
154 |
|
|
155 |
< |
/* send_members() |
155 |
> |
/* channel_send_members() |
156 |
|
* |
157 |
|
* inputs - |
158 |
|
* output - NONE |
159 |
|
* side effects - |
160 |
|
*/ |
161 |
|
static void |
162 |
< |
send_members(struct Client *client_p, const struct Channel *chptr, |
163 |
< |
char *modebuf, char *parabuf) |
162 |
> |
channel_send_members(struct Client *client_p, const struct Channel *chptr, |
163 |
> |
char *modebuf, char *parabuf) |
164 |
|
{ |
165 |
|
char buf[IRCD_BUFSIZE] = ""; |
166 |
|
const dlink_node *node = NULL; |
222 |
|
* \param flag Char flag flagging type of mode. Currently this can be 'b', e' or 'I' |
223 |
|
*/ |
224 |
|
static void |
225 |
< |
send_mode_list(struct Client *client_p, const struct Channel *chptr, |
226 |
< |
const dlink_list *list, const char flag) |
225 |
> |
channel_send_mask_list(struct Client *client_p, const struct Channel *chptr, |
226 |
> |
const dlink_list *list, const char flag) |
227 |
|
{ |
228 |
|
const dlink_node *node = NULL; |
229 |
|
char mbuf[IRCD_BUFSIZE] = ""; |
269 |
|
* \param chptr Pointer to channel pointer |
270 |
|
*/ |
271 |
|
void |
272 |
< |
send_channel_modes(struct Client *client_p, struct Channel *chptr) |
272 |
> |
channel_send_modes(struct Client *client_p, struct Channel *chptr) |
273 |
|
{ |
274 |
|
char modebuf[MODEBUFLEN] = ""; |
275 |
|
char parabuf[MODEBUFLEN] = ""; |
276 |
|
|
277 |
|
channel_modes(chptr, client_p, modebuf, parabuf); |
278 |
< |
send_members(client_p, chptr, modebuf, parabuf); |
278 |
> |
channel_send_members(client_p, chptr, modebuf, parabuf); |
279 |
|
|
280 |
< |
send_mode_list(client_p, chptr, &chptr->banlist, 'b'); |
281 |
< |
send_mode_list(client_p, chptr, &chptr->exceptlist, 'e'); |
282 |
< |
send_mode_list(client_p, chptr, &chptr->invexlist, 'I'); |
280 |
> |
channel_send_mask_list(client_p, chptr, &chptr->banlist, 'b'); |
281 |
> |
channel_send_mask_list(client_p, chptr, &chptr->exceptlist, 'e'); |
282 |
> |
channel_send_mask_list(client_p, chptr, &chptr->invexlist, 'I'); |
283 |
|
} |
284 |
|
|
285 |
|
/*! \brief Check channel name for invalid characters |
288 |
|
* \return 0 if invalid, 1 otherwise |
289 |
|
*/ |
290 |
|
int |
291 |
< |
check_channel_name(const char *name, const int local) |
291 |
> |
channel_check_name(const char *name, const int local) |
292 |
|
{ |
293 |
|
const char *p = name; |
294 |
|
|
320 |
|
mp_pool_release(ban); |
321 |
|
} |
322 |
|
|
323 |
< |
/* free_channel_list() |
323 |
> |
/* channel_free_mask_list() |
324 |
|
* |
325 |
|
* inputs - pointer to dlink_list |
326 |
|
* output - NONE |
327 |
|
* side effects - |
328 |
|
*/ |
329 |
< |
void |
330 |
< |
free_channel_list(dlink_list *list) |
329 |
> |
static void |
330 |
> |
channel_free_mask_list(dlink_list *list) |
331 |
|
{ |
332 |
|
dlink_node *node = NULL, *node_next = NULL; |
333 |
|
|
341 |
|
* \return Channel block |
342 |
|
*/ |
343 |
|
struct Channel * |
344 |
< |
make_channel(const char *name) |
344 |
> |
channel_make(const char *name) |
345 |
|
{ |
346 |
|
struct Channel *chptr = NULL; |
347 |
|
|
365 |
|
* \param chptr Channel pointer |
366 |
|
*/ |
367 |
|
void |
368 |
< |
destroy_channel(struct Channel *chptr) |
368 |
> |
channel_free(struct Channel *chptr) |
369 |
|
{ |
370 |
|
clear_invites_channel(chptr); |
371 |
|
|
372 |
|
/* Free ban/exception/invex lists */ |
373 |
< |
free_channel_list(&chptr->banlist); |
374 |
< |
free_channel_list(&chptr->exceptlist); |
375 |
< |
free_channel_list(&chptr->invexlist); |
373 |
> |
channel_free_mask_list(&chptr->banlist); |
374 |
> |
channel_free_mask_list(&chptr->exceptlist); |
375 |
> |
channel_free_mask_list(&chptr->invexlist); |
376 |
|
|
377 |
|
dlinkDelete(&chptr->node, &channel_list); |
378 |
|
hash_del_channel(chptr); |
1009 |
|
if (key && *key == '\0') |
1010 |
|
key = NULL; |
1011 |
|
|
1012 |
< |
if (!check_channel_name(chan, 1)) |
1012 |
> |
if (!channel_check_name(chan, 1)) |
1013 |
|
{ |
1014 |
|
sendto_one_numeric(source_p, &me, ERR_BADCHANNAME, chan); |
1015 |
|
continue; |
1074 |
|
} |
1075 |
|
|
1076 |
|
flags = CHFL_CHANOP; |
1077 |
< |
chptr = make_channel(chan); |
1077 |
> |
chptr = channel_make(chan); |
1078 |
|
} |
1079 |
|
|
1080 |
|
if (!HasUMode(source_p, UMODE_OPER)) |