Commit Graph

168 Commits

Author SHA1 Message Date
Kevin Easton
ab7d59f1f6 Add a length sanity check - just in case there's an implementation out there
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
2012-05-15 14:01:42 +00:00
Kevin Easton
ba365bfd54 Fix logic error that can result in a potential crash (when getaddrinfo() fails
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
2012-05-15 13:29:32 +00:00
Kevin Easton
9ec4f49540 Apply patch from snadge to set BIND_4_COMPAT on OpenBSD. This is similar
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
2012-05-15 13:16:11 +00:00
Kevin Easton
2f79061c0d Partially back out r183, by removing -fPIC from Cygwin builds. It's
unnecessary there and just creates a warning.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@186 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-15 12:52:25 +00:00
Kevin Easton
5b95a36896 Rebuilt for aclocal.m4 changes in r183.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@185 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-15 12:36:51 +00:00
Kevin Easton
e16b8197b0 Change message at end of "make install" to make vicodan happy.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@184 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-15 12:35:19 +00:00
Kevin Easton
4e53ace4f1 Use -fPIC for building plugins on NetBSD, OpenBSD, FreeBSD, BSDI and Cygwin.
Required for plugins to work on x86-64.

Thanks to snadge for this patch.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@183 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-15 12:22:13 +00:00
Kevin Easton
26a62fe7fa Rework the IPV6 verison of BX_ip_to_host() so that it works on BSD (used
by $iptoname() scripting function).


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@182 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-14 13:56:52 +00:00
Kevin Easton
f035eceb72 Pass the right socket address length to bind() in client connections with
IPv6 enabled.  This fixes an issue reported by packet, where IPv4 conections
don't work on FreeBSD when the client is built with IPv6 support and you
have a local hostname set (with /hostname, -H or IRCHOST).

Also ensure we clear the full size of the 'server' address structure - doesn't
fix a known problem but is a defensive measure.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@181 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-13 14:06:53 +00:00
Kevin Easton
35f0400e1f Fix typo.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@180 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-11 22:00:16 +00:00
Kevin Easton
d029695841 Remove old devel files that shouldn't have been left lying around.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@179 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-11 12:47:01 +00:00
Kevin Easton
e27169c15e Rebuild for configure.in r177.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@178 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-11 12:32:51 +00:00
Kevin Easton
0271799a4a Remove check for Linux from IPv6 tests. Replace GLIBC version test with
a generic link test for "native" IPv6.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@177 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-11 12:31:31 +00:00
Kevin Easton
5d788560a4 Choose the address length passed to connect() based on the address family.
This fixes making IPv4 connections on BSD when the client is compiled with
IPv6 enabled.

Thanks to brabes on sourceforge and snadge@freenode for originally tracking
this down.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@176 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-11 12:22:03 +00:00
Kevin Easton
0219904860 Ensure that real errors from connect() (eg. EINVAL) are detected and
acted on immmediately, even for nonblocking connects.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@175 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-11 12:03:10 +00:00
Kevin Easton
8e66eb6653 A few updated quit messages.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@174 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-10 12:47:51 +00:00
Kevin Easton
972b428e89 Create relative rather than absolute link to BitchX executable at
install time.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@173 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-10 12:42:25 +00:00
Kevin Easton
68a84226de Rebuild for configure.in r170.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@172 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-10 12:41:24 +00:00
Kevin Easton
c9fa7b0ce1 Remove unused sys/syslimits.h include.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@171 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-10 12:31:04 +00:00
Kevin Easton
eb964e1c52 Remove BitchX.spec and gtkBitchX.spec - these are obsolete now. A new
BitchX.spec will be added later.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@170 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-10 12:22:22 +00:00
Kevin Easton
822522affa Fix test so that sig.inc isn't built if sys_siglist, _sys_siglist or strsignal
is available.

In the long-run sig.inc should be built by a Makefile target.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@169 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-10 09:16:25 +00:00
Kevin Easton
5d1953946e Use the correct dependencies when checking for net/if.h, arpa/inet.h and resolv.h
(fixes a nasty configure spew on FreeBSD, reported by flashback).

Add check for sys/socket.h, replace unused checks for netinet/in_systm.h and 
sys/in_system.h with a check for netinet/in.h.  Remove unused check for
sys/syslimits.h.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@168 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-10 09:12:27 +00:00
Kevin Easton
de771dac56 Simplify install target for translation files and scripts. No longer creates
bxglobal.old backup of bxglobal file at install time.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@167 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-08 15:41:09 +00:00
Kevin Easton
3bbe082f16 Fix aim and nap plugin Makefiles so that they build compat.o in the right
place when building out-of-tree.  Reported by nyet.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@166 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-08 15:20:39 +00:00
Kevin Easton
b55825ab99 Rebuild configure from configure.in rev 164.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@165 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-08 14:35:53 +00:00
Kevin Easton
7ee26d4ed3 Change the install* targets in the Makefiles to honour DESTDIR. This
makes packaging the client for .deb and .rpm easier.

Reported separately by nyet and VICODAN.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@164 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-08 14:34:25 +00:00
Kevin Easton
cb0c2aabc2 Improve error handling in /detach - will now soft-fail the detach instead
of killing the whole client.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@163 13b04d17-f746-0410-82c6-800466cd88b0
2012-04-30 08:05:04 +00:00
Kevin Easton
3090365354 Change connect_by_number() so that SERVICE_SERVER sockets are always bound to
IPv4 even on an IPv6-enabled client.  This fixes /detach and wserv when
compiling with --enable-ipv6.

This does also mean that the internal identd, if used, won't listen on IPv6
either.  This isn't a problem yet, since the internal identd is used only on
WINNT and we don't support IPv6 there yet.

This will also need tweaking to support initiating DCC-over-IPv6.

Thanks to snadge and packet for working on this bug.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@162 13b04d17-f746-0410-82c6-800466cd88b0
2012-04-29 12:15:57 +00:00
Kevin Easton
10d5ab5a18 Changelog update for r160 change.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@161 13b04d17-f746-0410-82c6-800466cd88b0
2012-03-06 12:12:58 +00:00
Kevin Easton
97174632dc Add explicit default value for NICK_COMPLETION_CHAR.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@160 13b04d17-f746-0410-82c6-800466cd88b0
2012-03-06 11:14:51 +00:00
Kevin Easton
a9e1608865 Compile wterm.o, bircsig.o, wnetwork.o, bcompat.o, sterm.o directly
from source files without symlinks.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@159 13b04d17-f746-0410-82c6-800466cd88b0
2012-03-06 11:11:54 +00:00
Kevin Easton
dd6bb7752b Update copyright notice and add COPYRIGHT file to top-level of archive.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@158 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-29 22:56:23 +00:00
Kevin Easton
b0f8c03dec Cleanup ci_alist_hash() and cs_alist_hash(), fixes a compile warning.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@157 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-17 13:11:03 +00:00
Kevin Easton
e2ada61548 Modernise autoconf checks for sys_siglist and strsignal.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@156 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-17 12:30:55 +00:00
Kevin Easton
b7c216bcc6 Remove special compilation for help.c - DEFAULT_HELP_PATH isn't
referenced by the code.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@155 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-17 10:31:20 +00:00
Kevin Easton
c648b63fa6 Regenerate configure and defs.h.in using autoconf and autoheader 2.59.
(Applies FreeBSD 9 build fix from rev 152 to configure).  May also fix
strlcpy() detection with icc.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@154 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-17 10:24:38 +00:00
Kevin Easton
71584dfc23 Build system fixes - remove unnecessary acconfig.h.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@153 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-17 10:21:54 +00:00
Kevin Easton
f95ebdc259 Fix AC_CHECK_PLUGIN_SUPPORT to fix building on FreeBSD 9, and regenerate
aclocal.m4 with the fix.  This improves upon the original fix in revision 78,
and should actually fix the problem this time.

Reported by cpet and VICODAN.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@152 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-16 10:13:10 +00:00
Kevin Easton
6c6ae94dd4 Changelog update for rev 150 change.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@151 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-16 09:10:06 +00:00
Kevin Easton
5222ce2f1d Move window_check_servers() call out of loop, otherwise the client does a
huge amount of work on each keystroke if you have a long server list and
start it up disconnected (-N).


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@150 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-10 12:38:08 +00:00
Kevin Easton
87f24694b9 Remove unnecessary ns_init() function.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@149 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-10 11:22:14 +00:00
Kevin Easton
122849f247 Replace _getshort() and _getlong() with NS_GET16() and NS_GET32() respectively.
Fixes compilation on cygwin (and possibly other targets).


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@148 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-08 12:53:16 +00:00
Kevin Easton
7978a87c9f Change async DNS resolver code to register its file descriptor with the IO
core.  This fixes /nslookup.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@147 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-08 11:24:48 +00:00
Kevin Easton
ed16081a2b Remove bogus F_SETOWN use in /detach code.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@146 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-01 13:26:50 +00:00
Kevin Easton
5cf8ed2c79 Cleanup create_ipc_socket() and ensure it detects all errors in
connect_by_number().  Make function static since it is only used in one
source file.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@145 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-01 13:21:47 +00:00
Kevin Easton
71cc2bf5f4 Add FORMAT_WHOIS_SECURE for SSL connection info from ratbox, unreal and freenode servers (RPL_WHOISSECURE). Does not support
hybrid yet because it uses numeric 275, which clashes with unreal's RPL_STATSDLINE.

RIP dmr.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@144 13b04d17-f746-0410-82c6-800466cd88b0
2011-10-13 12:45:27 +00:00
Kevin Easton
15f6d8ac06 Pass through arguments of 338 numeric unchanged to script hook.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@143 13b04d17-f746-0410-82c6-800466cd88b0
2011-10-06 09:48:10 +00:00
Kevin Easton
b355145d69 Add /FSET CHANNEL_URL to format the RPL_CHANNELURL (328) numeric sent by dalnet and atheme services.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@142 13b04d17-f746-0410-82c6-800466cd88b0
2011-10-04 12:47:01 +00:00
Kevin Easton
89b77f68fe Cleanups and simplifications in mircansi(), removal of some more warnings.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@141 13b04d17-f746-0410-82c6-800466cd88b0
2011-09-07 14:41:06 +00:00
Kevin Easton
206df688ba Fix mircansi() so that it properly handles non-numeric characters
after a comma.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@140 13b04d17-f746-0410-82c6-800466cd88b0
2011-09-07 12:48:35 +00:00