ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/channel.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/channel.c (file contents):
Revision 6354 by michael, Fri Aug 14 17:53:44 2015 UTC vs.
Revision 6373 by michael, Fri Aug 21 10:00:10 2015 UTC

# Line 149 | Line 149 | remove_user_from_channel(struct Membersh
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;
# Line 222 | Line 222 | send_members(struct Client *client_p, co
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] = "";
# Line 269 | Line 269 | send_mode_list(struct Client *client_p,
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
# Line 288 | Line 288 | send_channel_modes(struct Client *client
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  
# Line 320 | Line 320 | remove_ban(struct Ban *ban, dlink_list *
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  
# Line 341 | Line 341 | free_channel_list(dlink_list *list)
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  
# Line 365 | Line 365 | make_channel(const char *name)
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);
# Line 1009 | Line 1009 | channel_do_join(struct Client *source_p,
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;
# Line 1074 | Line 1074 | channel_do_join(struct Client *source_p,
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))

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)