sprintf() as a format string, because there could (and usually are!) '%'
characters that will be interpreted by sprintf.
This also allows clean compilation under -Werror=format-security.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@246 13b04d17-f746-0410-82c6-800466cd88b0
description line doesn't contain a space. Found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@244 13b04d17-f746-0410-82c6-800466cd88b0
This is a longstanding bug - it's also present in EPIC4 and EPIC5 so it's
probably been in BitchX since the beginning. The bug has been latent until
the AUTHENTICATE and CAP commands were added, which perturbed the binary
search so that the client didn't see invite messages properly.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@235 13b04d17-f746-0410-82c6-800466cd88b0
(ERR_RESTRICTED), to set user mode +r - however this does not appear to
be necessary anymore. It was also buggy for several reasons: due to
a change in set_server_flag() this has actually been setting mode +G; and
484 is ERR_ISCHANSERVICE on other ircds.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@233 13b04d17-f746-0410-82c6-800466cd88b0
x = RESIZE(x, type, size);
which should just be:
RESIZE(x, type, size);
The erroneous use is undefined behaviour according to the C standard, and
causes new versions of gcc (and, apparently, clang) to throw a warning.
Reported by nenolod/moogle.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@227 13b04d17-f746-0410-82c6-800466cd88b0
recent Cygwin (including windows.h after the macros defined in modval.h
causes the build to fail due to our 'load' macro). Reported by VICODAN.
Also define WIN32_LEAN_AND_MEAN in misc.c, which should speed up Cygwin
build times a little.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@219 13b04d17-f746-0410-82c6-800466cd88b0
This includes all of the underlying support, but doesn't hook it up to the
/SERVER command yet, so it's not useable at this point.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@216 13b04d17-f746-0410-82c6-800466cd88b0
This doesn't tend to affect what window they go to, since for channels
there's always a target window based on the channel. But it does
affect logging.
This was fixed in EPIC4 back in 2001.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@214 13b04d17-f746-0410-82c6-800466cd88b0
case-insensitive filesystems like NTFS or HFS+, where it clashes with
the BitchX binary.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@204 13b04d17-f746-0410-82c6-800466cd88b0
This means that we shouldn't try to connect using IPv6 if the local machine
doesn't have an IPv6 address itself.
This also simplifies the IPv6 code in BX_connect_by_number() a bit.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@203 13b04d17-f746-0410-82c6-800466cd88b0
res_init() if /etc/resolv.conf doesn't exist, which is usual.
Add code to handle this by calling GetNetworkParams().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@198 13b04d17-f746-0410-82c6-800466cd88b0
and switch to using BIND4 macros (GETSHORT / GETLONG).
Should fix /nslookup on OpenBSD.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@196 13b04d17-f746-0410-82c6-800466cd88b0
that parses AF_UNIX addresses in getaddrinfo() or something.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@189 13b04d17-f746-0410-82c6-800466cd88b0
and res happened to be NULL).
Also add missing freeaddrinfo() call.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@188 13b04d17-f746-0410-82c6-800466cd88b0
to the existing BIND_8_COMPAT fix for OSX.
Oh how I hate the /nslookup function.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@187 13b04d17-f746-0410-82c6-800466cd88b0