These functions are only used by parse.c:annoy_kicks(), so move them next
to that function and make them static.
This also changes their arguments from unsigned char * to char *, getting rid
of some signed/unsigned mismatch warnings.
We now send PING <server> :<server> for /spings, and
PING LAG!<cookie>.<tv_sec>.<tv_usec> :<server> for lag checks. The cookie is
set randomly at server connect time, and means that clients connected to the
same bouncer shouldn't act on each other's lag checks.
We can now remove in_sping entirely - previously it would get out of synch if
you disconnected with a sping in progress.
Recent OpenBSD and NetBSD have changed time_t to be a 64 bit type on all
platforms. This means that on 32 bit systems, time_t is now longer than
long, and %lu can't be used to format it.
The lag check doesn't actually care what is in the first field of the PING
command, so change it to be our nick (which is arguably what it should be).
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@498 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
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
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
Clean up e_topic(), splitting out untopic() and using prepare_command()
to check for ops.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@136 13b04d17-f746-0410-82c6-800466cd88b0
using an /fset.
/CLONES now uses the same formats as the /U command. Also tweaked those
formats at the same time.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@98 13b04d17-f746-0410-82c6-800466cd88b0
Every other UNIX in existence defines BIND_4_COMPAT in arpa/nameser.h, which
ensures that nameser_compat.h gets included. Mac OS X changed it to
BIND_8_COMPAT and stopped including it by default.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@97 13b04d17-f746-0410-82c6-800466cd88b0
recieved; last_ctcp_reply is the last reply recieved (used by /RELCR etc.)
All of the /WI* commands now do a /WII style full whois request.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@88 13b04d17-f746-0410-82c6-800466cd88b0
that isn't in a channel with the client (god knows how *that* happens, but
someone reported the bug...) could crash the client, because a NULL pointer
is passed to logmsg(). The bug didn't show under glibc because it handles
the NULL pointer OK.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@58 13b04d17-f746-0410-82c6-800466cd88b0
This is the convert_output_format_raw changes that fix CVE-2007-4584.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@37 13b04d17-f746-0410-82c6-800466cd88b0
like x86-64, where sizeof(int) != sizeof (void *). This involves correctly
casting every function pointer from the global table to the correct
function type, which has the added benefit of allowing type-checking of
function arguments and return values.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@26 13b04d17-f746-0410-82c6-800466cd88b0