[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with channel modes and menubar + a patch



On Sat, 09 Nov 2002 12:56:21 +1100
Peter Zelezny <zed@linux.com> wrote:

> On Fri, 8 Nov 2002 15:46:20 -0600
> "James D. Taylor" <jtaylor5@bayou.uh.edu> wrote:
> 
> > See if this patch to src/common/proto-irc.c fixes the problem.
> > BTW, what IRC server/software are you having the problem with?
> > I don't think this patch will solve it, but it needed to be fixed anyway..
> > 
> > 
> > --- proto-irc.c 2002-11-08 15:25:23.000000000 -0600
> > +++ proto-irc.orig.c    2002-11-08 15:24:19.000000000 -0600
> > @@ -249,6 +249,12 @@ irc_raw (server *serv, char *raw)
> >         if (*raw)
> >         {
> >                 len = strlen (raw);
> > +               if (len > 2 && raw[len-2] == '\r' && raw[len-1] == '\n')
> > +               {
> > +                       /* no need to append a CR-LF pair */
> > +                       tcp_send_len (serv, raw, len);
> 
> 
> Ummmm.. Anything sent to irc_raw already has \r\n at the end.
> What's this for?
> 
> 

Ahh, excellent.  We could simplify everything that calls p_raw, or
we could simplify irc_raw.   It's a matter of interface convention.
So if we say that p_raw shouldn't be called with \r\n; then a lot of
specialized code goes away, and irc_raw stays the same.

To answer your question, the patch was to keep \r\n\r\n from happening.
I'm not sure how other servers would have handled this, but I know it
shouldn't have been happening.

Doug
jtaylor5@bayou.uh.edu

--
XChat-discuss: mailing list for XChat users
Archive:       http://mail.nl.linux.org/xchat-discuss/