Commit Graph

128 Commits

Author SHA1 Message Date
Kevin Easton
17e3a91f03 Remove handling for the 484 numeric. It was intended for ircnet's 484
(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
2013-02-25 12:22:54 +00:00
Kevin Easton
e99861dbfb Add /OBITS command showing obituaries for long-time BitchX friends.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@230 13b04d17-f746-0410-82c6-800466cd88b0
2013-02-21 22:29:34 +00:00
Kevin Easton
1390402af1 Fix abuses of the RESIZE() macro in array.c, of the form:
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
2013-02-16 08:11:07 +00:00
Kevin Easton
a1ec2113e9 Fix sort_scores in the acro plugin - pass the correct number of array entries
to qsort() and properly reconstruct the list.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@224 13b04d17-f746-0410-82c6-800466cd88b0
2013-01-04 10:11:32 +00:00
Kevin Easton
f51de3a170 Fix the timer callbacks in the acro plugin to use the correct function
signature.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@223 13b04d17-f746-0410-82c6-800466cd88b0
2013-01-04 09:03:12 +00:00
Kevin Easton
bf40ef7015 Use INSTALL_DATA instead of INSTALL to install the BitchX.hints file. This
means it's not made executable.

Patch from Jeff Horelick <jdhore@gentoo.org>.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@222 13b04d17-f746-0410-82c6-800466cd88b0
2013-01-03 03:03:30 +00:00
Kevin Easton
2027f75969 Move inclusion of system headers in misc.c to top, which fixes building on
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
2013-01-02 22:40:58 +00:00
Kevin Easton
b2c9da8fef Fix the AC_CHECK_PLUGIN_SUPPORT configure macro so that it matches FreeBSD-1.*
instead of FreeBSD-1*, which fixes building with plugins on FreeBSD-10.  Also
a similar fix for the FreeBSD-2.* case.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@217 13b04d17-f746-0410-82c6-800466cd88b0
2012-12-30 22:47:03 +00:00
Tim Cava
0d67cac5f7 Add a note about fixing QUITs with SSL connections.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@215 13b04d17-f746-0410-82c6-800466cd88b0
2012-10-21 01:36:23 +00:00
Kevin Easton
1e7c7edd1b Use LOG_PUBLIC instead of LOG_MSG for PRIVMSGs sent to channels.
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
2012-10-19 12:25:25 +00:00
Kevin Easton
f7607baf45 Add tcl.c to source distribution (panasync gave his permission for this to be released).
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@213 13b04d17-f746-0410-82c6-800466cd88b0
2012-10-19 12:11:05 +00:00
Kevin Easton
3ed7f68d4e Rename include/bitchx to include/options.h. This fixes building on
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
2012-06-02 14:53:37 +00:00
Kevin Easton
252d1bf004 On systems that support it, supply the AI_ADDRCONFIG flag to getaddrinfo().
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
2012-06-02 11:38:37 +00:00
Kevin Easton
fa42be30ae Change configure.in to enable SSL by default, if libssl is present. Can
still be disabled with --without-ssl.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@201 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-31 12:40:26 +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
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
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
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
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
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
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
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
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
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
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
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
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
Kevin Easton
02e4ced684 Add PC_TOPIC flag to prepare_command() for topic-change commands.
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
2011-09-05 12:57:31 +00:00
Kevin Easton
b628217600 Fix a memory leak in the URL grabber - as old URLs were expired from the list,
they weren't being freed.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@131 13b04d17-f746-0410-82c6-800466cd88b0
2011-05-17 14:03:29 +00:00
Kevin Easton
47ce4ab1e1 Apply changes to BitchX.help from t3gah.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@124 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-18 12:38:21 +00:00
Kevin Easton
09c34c045f Further cleanups and fixes in chelp.c:read_file(). Now properly adds NULLs to
terminate the lists, that the code in get_help_topic() expects to be there - 
fixes a potential crash in /bhelp.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@123 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-17 11:58:16 +00:00
Kevin Easton
780ac2c149 Cleanup and rename replace_color() to put_color(), including sanity-checking of
foreground color code - this ensures that if a wild color code makes it this
far, it doesn't crash the client.



git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@121 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-08 13:10:05 +00:00
Kevin Easton
c45c6a69bf Cleanup p_mode() and correct handling of user mode changes where the source
and the target aren't the same (reported by gauze).  This doesn't happen
on standard servers, but is used by services on some networks.

Adds /FSET USERMODE_OTHER.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@114 13b04d17-f746-0410-82c6-800466cd88b0
2011-03-31 22:20:21 +00:00
Kevin Easton
719279790e Add some more TLDs to $country(), synchronised with the IANA list: .ax, .eu,
.me, .rs, .tl, .asia, .cat, .jobs, .tel and .travel.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@113 13b04d17-f746-0410-82c6-800466cd88b0
2011-03-31 08:32:23 +00:00
Kevin Easton
b17b09949b Improve country() by using "static const" for lookup table (makes function 25% smaller)
and const-correctness.  Add .mobi TLD.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@112 13b04d17-f746-0410-82c6-800466cd88b0
2011-03-23 11:17:23 +00:00
Kevin Easton
94550b1fac Changelog update - Irix fixes.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@111 13b04d17-f746-0410-82c6-800466cd88b0
2011-02-02 12:41:50 +00:00
Kevin Easton
6711ef7f00 Correct use of IN6ADDR_ANY_INIT initialiser, fixes IPv6 build on Intel ICC.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@105 13b04d17-f746-0410-82c6-800466cd88b0
2010-12-16 21:15:15 +00:00
Kevin Easton
d1e13bc526 Show correct message ("Remote end closed connection") when we get EOF
on a socket.

I also added a wrapper function around strerror() for dgets_errno, since
we did the same thing in a few places.  This all needs to be cleaned up
a little - the -1 value we use could in theory clash with an actual
errno error number.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@104 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-30 13:26:06 +00:00
Kevin Easton
7a59da1f2e Add /FSET WHOIS_CALLERID for +g mode notification on hybrid & ratbox.
This is numeric 716.  Hybrid shows it in WHOIS, and both show it when you
try to PRIVMSG someone who is +g (similar to AWAY).  So I've formatted it
to match the WHOIS block.

I also took the chance to fix up the ordering of the fsets, and remove
a bunch of redundant setting of default values.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@103 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-30 12:48:28 +00:00
Kevin Easton
5430be4c78 Add RPL_WHOISHOST (378) numeric from Unreal (and freenode).
Formats with /fset WHOIS_ACTUALLY.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@102 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-20 12:30:55 +00:00
Kevin Easton
2f92982eac Build script fix to allow plugins to build on x86-64.
$(SHLIB_CFLAGS) is required on the compile line, not just the link line.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@99 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-09 01:08:14 +00:00
Kevin Easton
f71e26acc7 Correct count in /CLONES (reported by t3gah), and format output nicely
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
2010-09-06 13:40:13 +00:00
Kevin Easton
cb8e8c21ae Add definition of BIND_8_COMPAT to fix build problem on Mac OS X.
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
2010-09-06 12:46:03 +00:00
Kevin Easton
518186b85b Add changelog message for -z command line option fix.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@96 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-05 09:21:16 +00:00