Tim Cava
172bb8c409
Use strlcpy, rather than strmcpy, in tcl_putserv().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@342 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:19:50 +00:00
Tim Cava
3c4acd0446
Use strlcpy, rather than strmcpy, in tcl_putloglev().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@341 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:16:23 +00:00
Tim Cava
5b3d5bf285
Use strlcpy, rather than strmcpy, in tcl_putcmdlog().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@340 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:14:29 +00:00
Tim Cava
905bceb348
Use strlcpy, rather than strmcpy, in tcl_putlog().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@339 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:13:15 +00:00
Tim Cava
8a0d84b3ab
Use strlcpy, rather than strmcpy, in status_windowspec().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@338 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:06:38 +00:00
Tim Cava
bcdf91f415
Use strlcpy, rather than strmcpy, in status_refnum().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@337 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:04:20 +00:00
Tim Cava
e8bca384b9
Use strlcpy, rather than strmcpy, in status_topic().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@336 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:01:46 +00:00
Tim Cava
adf7bc4b68
Use strlcpy, rather than strmcpy, in status_channel().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@335 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 04:59:44 +00:00
Tim Cava
d56010df9b
Use strlcpy, rather than strmcpy, in status_umode().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@334 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 04:54:42 +00:00
Tim Cava
fdddcf99bf
Use strlcpy, rather than strmcpy, in make_status().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@333 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 04:47:19 +00:00
Tim Cava
89d82d7ae0
Use strlcpy, rather than strmcpy, in fix_status_buffer().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@332 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 04:39:08 +00:00
Kevin Easton
0b0dbf5cf7
Make the RANDOM_LOCAL_PORTS setting actually use a random port.
...
The code was calling random_number(65535 - 1024), but a non-zero argument
to random_number() is actually a seed to reseed the generator, and causes
random_number() to return zero.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@331 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 15:06:21 +00:00
Kevin Easton
176be1cff2
Add the ability to bind listening sockets to addresses, and use this for the
...
/detach IPC socket.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@330 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 14:05:15 +00:00
Tim Cava
a394019490
Use strlcpy, rather than strmcpy, in window_log().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@329 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 10:55:09 +00:00
Tim Cava
674558ece4
Use strlcpy, rather than strmcpy, in delete_window().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@328 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 10:46:09 +00:00
Tim Cava
e4e8a1358a
Use strlcpy, rather than strmcpy, in show_server_map().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@327 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 10:41:00 +00:00
Tim Cava
72cf367e45
Use strlcpy, rather than strmcpy, in accept_server_nickname().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@326 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 10:35:43 +00:00
Tim Cava
68c3df7c6c
Use strlcpy, rather than strmcpy, in set_server_nickname().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@325 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 10:28:56 +00:00
Tim Cava
337dfe0d06
Don't copy into a passwd struct returned by getpwuid().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@324 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 09:18:14 +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
Kevin Easton
a6f8021cd9
Fix a couple of compiler warnings in irc.c - two places where the address
...
of an array was tested (always not-NULL) and one unused variable (first_time
in io()).
The user-visible change here is that the emergency exit QUIT messages
(eg "User abort with 5 Ctrl-C's") will be correctly relayed to the local
terminal now.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@321 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 14:39:24 +00:00
Kevin Easton
1cfaf1349c
Remove XLINK CTCP reply handler - it's not used for the botlink
...
functionality.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@320 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 13:34:04 +00:00
Kevin Easton
4a25f5462f
Simplify code that produces realname from gecos, replace strmcat() with strlcat().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@319 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 09:32:33 +00:00
Tim Cava
74f8a720c4
Use strchr, rather than index, which is a legacy function. From caf.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@318 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 07:22:32 +00:00
Tim Cava
c0bc9294cd
Use strlcpy, rather than strmcpy, in parse_args().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@317 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 07:01:30 +00:00
Tim Cava
b1d55bce82
Use memcpy, rather than strmcpy or strlcpy, in parse_command(). Suggested
...
by caf.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@316 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 04:15:09 +00:00
Tim Cava
0460b22bb0
Use strlcpy, rather than strmcpy, in realname_cmd().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@315 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-12 10:57:52 +00:00
Tim Cava
18142f0abe
Use strlcpy, rather than strmcpy, in set_username().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@314 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-12 10:37:10 +00:00
Tim Cava
44e59337ee
Include the size of hostname, nickname, realname, userhost and username
...
in their forward declarations.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@313 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-12 10:36:14 +00:00
Kevin Easton
338a8ecd4c
Remove unnecessary declarations in term.c for wserv builds.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@312 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-12 09:40:59 +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
c7cefb1c05
Don't look beyond the end of a cparse format if it ends with % or $.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@310 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-10 15:59:04 +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
975bc2bc57
Don't compare an array to NULL, but check that the first character isn't
...
NULL. Found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@308 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-09 07:30:54 +00:00
Kevin Easton
6691732900
Make add_socketread() close the new socket if it can't be added to the
...
socket manager because it exceeds FD_SETSIZE.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@307 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-07 23:03:45 +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
d68a196b8a
Mention fixes to commands in the banlist.c cleanup.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@297 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 05:40:44 +00:00
Tim Cava
92012cccd1
Cleanup banlist.c and fix a few bugs, with suggestions from caf.
...
* Restore from_server in doop() when prepare_command() fails
* Make /bans &channel work
* Make /unban #channel #number work (caf)
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@296 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-17 14:17:29 +00:00
Tim Cava
49a7117900
Including dcc.h in window.c is unnecessary.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@295 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:21:26 +00:00
Tim Cava
73bf008b9f
Remove a duplicate include of dcc.h.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@294 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:20:49 +00:00
Tim Cava
2d0c2ac415
Including dcc.h in screen.c is unnecessary.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@293 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:19:53 +00:00