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
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
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
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
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
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
Tim Cava
be47d08d53
Including dcc.h in exec.c is unnecessary.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@292 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:19:02 +00:00
Tim Cava
4309055cf7
Including dcc.h in commands2.c is unnecessary.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@291 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:02:23 +00:00
Tim Cava
6ae6edc0fb
Make the definition of Tgetstr() use the value of y, when terminfo is
...
available, which quiets an unused variable warning.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@289 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 04:13:52 +00:00
Tim Cava
2d80cbb680
Restore this variable, as it's used when terminfo isn't available.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@288 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 03:48:43 +00:00
Tim Cava
3b509dfa52
Kill an unused variable in term_init().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@287 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 03:17:49 +00:00
Kevin Easton
9378704c39
Improve the list_channels() function so that it behaves correctly when
...
connected to multiple servers.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@285 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 14:01:20 +00:00
Kevin Easton
e915462aef
Change a & to && in BX_do_compress_modes() to squash a warning. Should
...
be no behavioural change.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@283 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 13:25:22 +00:00
Tim Cava
0450875ab5
Remove two unnecessary includes from alias.c.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@282 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 05:26:51 +00:00
Tim Cava
37dcaad1ae
Make the addrlen passed to connect() in connect_by_number() a socklen_t.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@281 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 04:16:13 +00:00
Tim Cava
e070369079
Make the namelen passed to getsockname() a socklen_t everywhere.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@280 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 03:26:00 +00:00
Tim Cava
80cfa9c5d8
Make the namelen passed to getpeername() a socklen_t everywhere.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@279 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 03:18:47 +00:00
Tim Cava
27ed98a03d
Make the addrlen passed to my_accept() a socklen_t everywhere.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@278 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 03:09:16 +00:00
Tim Cava
a3b938dfd5
Make the addrlen argument to my_accept() a socklen_t.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@277 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 02:59:11 +00:00
Kevin Easton
cc0b75f2dd
Include <termios.h> in preference to <sys/termios.h>.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@275 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 02:01:59 +00:00
Kevin Easton
791c49986e
Remove unnecessary termios.h includes.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@272 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 00:51:58 +00:00
Tim Cava
b4cd944bef
The third argument to accept() should be a socklen_t.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@269 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-13 22:21:32 +00:00
Tim Cava
4ff0b8d2d5
Make sure setupterm() returns ERR before examining the status value.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@252 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-01 01:23:18 +00:00
Kevin Easton
8a04cbeba8
Don't pass the output of convert_output_format(FORMAT_DCC, ...) directly to
...
sprintf() as a format string, because there could (and usually are!) '%'
characters that will be interpreted by sprintf.
This also allows clean compilation under -Werror=format-security.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@246 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-23 14:36:32 +00:00
Kevin Easton
dd9de3dff0
Update (currently un-used) save_digraphs() function so that it compiles
...
cleanly with -Werror=format-security.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@245 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-23 14:32:47 +00:00
Kevin Easton
c51810738e
Improve handling of one kind of malformed CDCC save file, where the pack
...
description line doesn't contain a space. Found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@244 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-20 01:45:29 +00:00
Kevin Easton
882c3150e2
Fix open file leak in /LASTLOG, in situations like:
...
/LASTLOG -FILE /tmp/a -FILE /tmp/a
/LASTLOG -FILE /tmp/a -CLEAR
/LASTLOG -FILE /tmp/a -LITERAL
/LASTLOG -FILE /tmp/a -BOGUS
Found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@243 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-18 12:55:32 +00:00
Kevin Easton
2fc84d5f93
Fix a file descriptor leak when connect() fails during a SOCKS4 proxy
...
connection attempt.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@242 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-18 11:00:12 +00:00
Tim Cava
b26e295137
Improve cryptit() fixes, suggested by caf.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@241 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-17 08:00:37 +00:00
Tim Cava
df8328c3a1
Fix out-of-bounds error in cryptit() found by Coverity.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@240 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-16 14:40:52 +00:00
Kevin Easton
88172a9004
paused_topic should be the same size as help_topic_list.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@239 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-16 13:12:59 +00:00
Kevin Easton
ceb0492734
Cleanup save_formats() by removing unused function argument.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@238 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-16 12:21:03 +00:00
Kevin Easton
bad477f9dc
Fix off-by-one error in the check for s against FD_SETSIZE in add_socketread()
...
and set_socketwrite(). This was found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@237 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-16 06:04:29 +00:00
Kevin Easton
092d9789e0
Order the rfc1459[] array correctly.
...
This is a longstanding bug - it's also present in EPIC4 and EPIC5 so it's
probably been in BitchX since the beginning. The bug has been latent until
the AUTHENTICATE and CAP commands were added, which perturbed the binary
search so that the client didn't see invite messages properly.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@235 13b04d17-f746-0410-82c6-800466cd88b0
2013-04-24 12:05:44 +00:00
Kevin Easton
73269ea887
Bail out of check_auto_reply() early if auto_str is NULL. This fixes a
...
crash after /SETAR -.
Reported by riderplus.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@234 13b04d17-f746-0410-82c6-800466cd88b0
2013-03-01 12:33:00 +00:00