82 Commits

Author SHA1 Message Date
Kevin Easton b5afd1d596 Replace last uses of bcopy() with memcpy()
memcpy() / memmove() are standard everywhere, this lets us remove the configure script checking around bcopy()
which helps building on Haiku OS.
2018-11-11 01:07:31 +11:00
Kevin Easton 99c5ec9872 Change arcfour example module to use ARC4CHAT instead of SCHAT as the DCC type
The SCHAT type is already used by some other clients for SSL CHAT.  This example module doesn't work
yet anyway, so no-one can actually be using it.
2018-03-14 16:58:10 +11:00
Kevin Easton 5ae42802ec Fix crash when unloading the arcfour module
Remove the empty Arcfour_Cleanup() function so that the default module cleanup can happen.

Define MODULE_NAME and use that when registering the module callbacks so that the default
module cleanup will remove them correctly.
2018-02-20 23:00:00 +11:00
Kevin Easton 61a926a766 Introduce a struct dcc_ops to contain all functions pointers for a custom DCC type
Modules now must pass a pointer to a struct dcc_ops when calling add_dcc_bind() instead of
a list of function pointers.
2018-02-08 22:39:49 +11:00
Kevin Easton d15a738ee9 Don't limit dcc_schat_input to DCC_CHAT type (which is never true) 2018-01-06 21:20:48 +11:00
Kevin Easton 2c94010d65 Update arcfour example module to use exported dcc_chat_socketread() callback
This allows it to actually connect OK, but it's still nonfunctional at the moment.
2017-12-20 18:10:02 +11:00
Kevin Easton 860e7e28fb Fix unsigned char / char mismatch warnings in encrypt plugin
There's no need to dynamically allocate encode_string, so just make it static.

It does need to be unsigned char though, for the loop that intialises it.  So cast it
when calling my_encrypt() / my_decrypt().
2017-11-25 01:37:11 +11:00
Kevin Easton e63033e1d5 Include tcl.h via tcl_bx.h, not directly
This fixes 'const char **' vs 'char **' compiler warnings.

Additionally, tcl_bx.h always defines STDVAR and can be included without checking for WANT_TCL.
2017-11-25 01:18:13 +11:00
Kevin Easton c719a0ecb3 Test pointer against NULL rather than casting to int 2017-11-25 01:09:11 +11:00
Kevin Easton 2b84718039 Remove unused have_head variable in possum.c 2017-11-25 01:02:47 +11:00
Kevin Easton 21ed1a01a3 Numerous minor fixes to nap plugin 2017-11-25 00:53:43 +11:00
Kevin Easton 862137d975 Remove redundant test in fserv.c 2017-11-24 23:47:37 +11:00
Kevin Easton c426c0dcca Use correct *printf format specifiers in fserv.c
Format ints with %d, not %u.
2017-11-24 23:25:10 +11:00
Kevin Easton f621f48a25 Fix some obvious errors in do_dccbomb() 2017-11-24 23:17:39 +11:00
Kevin Easton a58078de7e Fix size argument in call to memset in MD5Final()
This function isn't used anyway, but the compiler was warning about the incorrect code.
2017-11-06 17:07:58 +11:00
Kevin Easton fcda7a4d55 Switch cavlink and nap plugins to use save_dllvar() function for saving SETs
This removes the only module uses of dll_variable, allowing it to be removed from the module
exports.
2017-11-06 17:01:36 +11:00
Kevin Easton bb616e0626 Change send_text() to combine command, hook and log arguments into one set of flags
This function is exported to modules, so it requires updating a few modules and rolling the module table version.
2017-07-09 00:08:04 +10:00
Kevin Easton f8c76a4351 Include ircaux.h in qbx.c
This is required for SERVICE_CLIENT and PROTOCOL_UDP.
2017-07-08 21:34:28 +10:00
Kevin Easton ce3fd79652 Global spelling fix s/recieve/receive/ across codebase
This includes some user-visible messages and help files, so if anyone has
hooked them with /ON WINDOW their hooks will need updating.
2015-10-04 09:06:38 +11:00
Kevin Easton e0bdc609c1 Fix type mismatches and remove unused variables in nap plugin
Should just fix compiler warnings.
2015-09-10 17:00:09 +10:00
Kevin Easton 6d6717e56e Fix type mismatch errors in fserv module
No functional change, this just fixes some compiler warnings.
2015-09-10 16:31:34 +10:00
Kevin Easton 723cb5be9b Remove some set-but-not-used variables in the cavlink module
Cleans up some compiler warnings.
2015-09-10 14:57:00 +10:00
Kevin Easton c99345f1ce Fix char / unsigned char mismatch in blowfish module
Cleans up a compile warning, no functional change.
2015-09-09 23:14:01 +10:00
Kevin Easton 642ab8829d Fix up some type mismatch errors in the arcfour module 2015-09-07 17:12:04 +10:00
Kevin Easton 35b1a65f03 Remove obsolete AIM plugin
The servers for the TOC protocol used by this plugin were decomissioned
by AOL in 2012, so it can't be used any longer.
2015-09-06 23:33:36 +10:00
Kevin Easton 1c6ff3088a Fix compilation problems in 'amp' plugin.
Four instances where 'default:' is at the end of a block replaced with
'default: break;' (reported by mscherer).

One typo where [j] should have been [1] (array out of bounds error).

Missing <unistd.h> includes for _exit(), and <string.h> for memcpy().
2015-03-17 00:06:34 +11:00
Kevin Easton a05b1160c3 Change build to pass through CPPFLAGS if provided, and to use the DEFS value set by configure.
The DEFS Makefile variable has been renamed to CPPFLAGS, and is now set based on the CPPFLAGS,
INCLUDES and DEFS values provided by configure.

Reported by cpet, this allows the FreeBSD port to drop a patch.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@519 13b04d17-f746-0410-82c6-800466cd88b0
2014-11-01 14:37:41 +00:00
Kevin Easton 324cdd4c85 Update plugins to cast time_t to long when formatting with %ld.
Fixes platforms where time_t and long are different sizes.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@474 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-16 10:59:34 +00:00
Kevin Easton 933478d7b1 Rename cavlink's randm() function to cav_randm() so that it doesn't clash with
the definition from ircaux.h.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@396 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-16 11:59:36 +00:00
Kevin Easton 742887059d arcfour: Zero the full size of the 'in' array.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@379 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-06 13:18:22 +00:00
Tim Cava 15c5f518fd Make the port passed to qbx's query_q_server() an unsigned short,
which eliminates a warning.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@323 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 23:18:07 +00:00
Tim Cava bc485f95a8 Possum's llist uses memcpy, so include string.h and eliminate a warning.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@322 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 22:32:48 +00:00
Tim Cava ca7f9c6b86 Use memcmp, rather than strncmp, in wavplay's validate_wav_header(),
and avoid warnings about mismatched signedness.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@311 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-11 08:20:37 +00:00
Kevin Easton 9e0ba0a573 Pass correct buffer size to fgets().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@309 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-10 03:54:48 +00:00
Tim Cava 718e53d6f0 Refactor fserv's make_temp_list(), with help from caf, and use mkstemp()
instead of tmpnam(), which is dangerous. Found by Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@306 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-07 01:00:11 +00:00
Tim Cava 16fac903e9 Reverse the last commit, which accidentally included generated files.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@305 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-07 00:56:16 +00:00
Tim Cava 1ead56a251 Refactor fserv's make_temp_list(), with help from caf, and use mkstemp()
instead of tmpnam(), which is dangerous. Found by Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@304 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-07 00:50:43 +00:00
Kevin Easton c85ca721e3 strmcpy() does include the null terminator in the maximum number of bytes to
be written, so use sizeof - 1 instead of sizeof.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@303 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-01 14:47:12 +00:00
Tim Cava 565621d070 Use strmcpy, instead of strcpy, to initialize FSstr. Fixes a potential buffer overflow found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@302 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 09:28:46 +00:00
Tim Cava aefa6e71f4 Kill an unnecessary LOCAL_COPY() in fserv's print_mp3().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@301 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 07:39:13 +00:00
Tim Cava 94e04ff631 Remove a small amount of dead code found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@300 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 07:28:45 +00:00
Tim Cava b0fa3c55e6 Fix the for loop in cav_away().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@299 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 07:15:29 +00:00
Tim Cava 4057523aef Don't bother storing what find_in_list() returns, it goes unused. Found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@298 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 05:50:22 +00:00
Tim Cava b786c75e7a Include string.h in arcfour's MD5 implementation, since it uses memset().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@290 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 04:23:40 +00:00
Tim Cava 64779fd515 nap:naplink_handlelink() The third argument to accept() should be a
socklen_t.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@268 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-13 21:58:15 +00:00
Tim Cava b5f835e8fc identd:identd_handler() The third argument to accept() should be a
socklen_t.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@267 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-13 21:57:31 +00:00
Tim Cava 76528c6f38 arcfour:start_dcc_chat() The third argument to accept() should be a
socklen_t.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@266 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-13 21:53:24 +00:00
Kevin Easton d6393b8248 acro plugin: Use correct module name when registering command.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@265 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-10 13:33:43 +00:00
Kevin Easton b1de392172 acro plugin: Don't sort scores when saving to file. This was losing the head
of the list, and it's not necessary anyway.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@264 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-10 12:57:06 +00:00
Tim Cava ee35df3a41 Don't seed arcfour with uninitialized stack values when urandom can't be
opened, but fail instead. Fixes using uninitialized value warnings from
Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@263 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-09 07:06:43 +00:00