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

Comparing ircd-hybrid/modules/core/m_sjoin.c (file contents):
Revision 490 by db, Fri Feb 17 05:07:43 2006 UTC vs.
Revision 491 by michael, Wed Mar 1 14:51:05 2006 UTC

# Line 88 | Line 88 | ms_sjoin(struct Client *client_p, struct
88    time_t         newts;
89    time_t         oldts;
90    time_t         tstosend;
91 <  static         struct Mode mode, *oldmode;
91 >  struct Mode mode, *oldmode;
92    int            args = 0;
93    char           keep_our_modes = YES;
94    char           keep_new_modes = YES;
# Line 99 | Line 99 | ms_sjoin(struct Client *client_p, struct
99    char           *np, *up;
100    int            len_nick = 0;
101    int            len_uid = 0;
102 <  int            isnew;
102 >  int            isnew = 0;
103    int            buflen = 0;
104    int            slen;
105    unsigned       int fl;
# Line 120 | Line 120 | ms_sjoin(struct Client *client_p, struct
120    if (*parv[2] != '#')
121      return;
122  
123 <  if (!check_channel_name(parv[2]))
123 >  if (!check_channel_name(parv[2], 0))
124 >  {
125 >    sendto_realops_flags(UMODE_DEBUG, L_ALL,
126 >                         "*** Too long or invalid channel name from %s: %s",
127 >                         client_p->name, parv[2]);
128      return;
129 +  }
130  
131    modebuf[0] = '\0';
132    mbuf = modebuf;
# Line 172 | Line 177 | ms_sjoin(struct Client *client_p, struct
177  
178    parabuf[0] = '\0';
179  
180 <  if ((chptr = get_or_create_channel(source_p, parv[2], &isnew)) == NULL)
181 <    return; /* channel name too long? */
180 >  if ((chptr = hash_find_channel(parv[2])) == NULL)
181 >  {
182 >    isnew = 1;
183 >    chptr = make_channel(parv[2]);
184 >  }
185  
186    oldts   = chptr->channelts;
187    oldmode = &chptr->mode;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines