ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/modules/m_accept.c
(Generate patch)

Comparing ircd-hybrid/trunk/modules/m_accept.c (file contents):
Revision 3156 by michael, Fri Mar 14 19:57:38 2014 UTC vs.
Revision 3246 by michael, Sun Mar 30 17:37:13 2014 UTC

# Line 47 | Line 47 | static void
47   list_accepts(struct Client *source_p)
48   {
49    int len = 0;
50 <  char nicks[IRCD_BUFSIZE] = { '\0' };
50 >  char nicks[IRCD_BUFSIZE] = "";
51    char *t = nicks;
52    const dlink_node *ptr = NULL;
53  
# Line 72 | Line 72 | list_accepts(struct Client *source_p)
72                   accept_p->userptr, accept_p->hostptr);
73    }
74  
75 <  if (nicks[0] != '\0')
75 >  if (nicks[0])
76    {
77      *(t - 1) = '\0';
78      sendto_one_numeric(source_p, &me, RPL_ACCEPTLIST, nicks);
# Line 117 | Line 117 | m_accept(struct Client *source_p, int pa
117   {
118    char *mask = NULL;
119    char *p = NULL;
120 <  char nick[NICKLEN + 1];
121 <  char user[USERLEN + 1];
122 <  char host[HOSTLEN + 1];
120 >  char nick[NICKLEN + 1] = "";
121 >  char user[USERLEN + 1] = "";
122 >  char host[HOSTLEN + 1] = "";
123    struct split_nuh_item nuh;
124    struct split_nuh_item *accept_p = NULL;
125  
# Line 129 | Line 129 | m_accept(struct Client *source_p, int pa
129      return 0;
130    }
131  
132 <  for (mask = strtoken(&p, parv[1], ","); mask != NULL;
132 >  for (mask = strtoken(&p, parv[1], ","); mask;
133         mask = strtoken(&p,    NULL, ","))
134    {
135      if (*mask == '-' && *++mask != '\0')
# Line 173 | Line 173 | m_accept(struct Client *source_p, int pa
173  
174        split_nuh(&nuh);
175  
176 <      if ((accept_p = find_accept(nick, user, host, source_p, irccmp)) != NULL)
176 >      if ((accept_p = find_accept(nick, user, host, source_p, irccmp)))
177        {
178          sendto_one_numeric(source_p, &me, ERR_ACCEPTEXIST, nick, user, host);
179          continue;

Diff Legend

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