Kevin Easton
7eae2aba86
Change arguments of my_strnstr() from const unsigned char * to const char *
...
This kills warnings in both ircaux.c and input.c.
2015-06-07 00:30:05 +10:00
Kevin Easton
b14d0ddcb9
Add timer_cmp() utility function to compare two timevals.
...
This is preferable to using time_diff() to compare two timevals, because
time_diff() gives its result as a 'double' which only has 53 bits of
precision.
Also switch a couple of places from using time_diff() to using
this function.
2015-05-21 01:21:02 +10:00
Kevin Easton
4ee6c6295b
Add time_until() and time_since() utility functions
...
Adding these in preparation for converting server->connect_time from time_t
to struct timeval. Also converts three existing open-coded versions over to
the new functions.
2015-05-13 21:50:30 +10:00
Tim Cava
112b38ac7a
Revert the last commit. It accidentally had autogenerated files in it.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@432 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-07 03:00:24 +00:00
Tim Cava
276fd24258
Use snprintf rather than sprintf. From pvaldes.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@431 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-07 02:41:16 +00:00
Tim Cava
95a7534c8c
Use strlcat, rather than strmcat, in BX_path_search.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@404 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-23 14:35:37 +00:00
Tim Cava
57020a48e7
Use strlcat, rather than strmcat, in get_userhost().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@403 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-20 18:40:18 +00:00
Tim Cava
12d3fadfb1
Use strlcat, rather than strmcat, in expand_twiddle().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@398 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-19 20:10:19 +00:00
Tim Cava
56f5eceb26
Don't compare an array (cx_function) against NULL. Don't bother checking
...
whether a context is empty, since the result is the same.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@365 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-23 02:55:27 +00:00
Kevin Easton
2fea73808f
Improve the initial seeding of the randm() RNG. This is the RNG selected
...
for $rand() when RANDOM_SOURCE is 1.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@359 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 15:10:17 +00:00
Kevin Easton
5582171286
Switch random_number() to always use the best entropy source for internal
...
client purposes. The RANDOM_SOURCE setting now only affects the $rand()
scripting function.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@357 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 14:47:04 +00:00
Tim Cava
d194069da9
Use strlcpy, rather than strmcpy, in expand_twiddle().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@356 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 09:28:09 +00:00
Tim Cava
b80425ce7d
Use strlcpy, rather than strmcpy, in get_userhost().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@355 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 09:18:11 +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
1541299fa1
Merge infrastructure for SASL authentication support from flashback.
...
This includes all of the underlying support, but doesn't hook it up to the
/SERVER command yet, so it's not useable at this point.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@216 13b04d17-f746-0410-82c6-800466cd88b0
2012-12-30 02:22:56 +00:00
Kevin Easton
d22a4531d8
Update old email addresses in user-visible messages.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@206 13b04d17-f746-0410-82c6-800466cd88b0
2012-06-13 12:34:32 +00:00
Kevin Easton
b43ecbaa85
Improve memory allocation routines to fix alignment and remove non-standard
...
void * arithmetic.
Fixes compilation on Irix.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@109 13b04d17-f746-0410-82c6-800466cd88b0
2011-02-02 12:15:29 +00:00
Kevin Easton
7ac4b8520c
Convert my_stricmp, my_strnicmp and wild_match from unsigned char * to char *.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@80 13b04d17-f746-0410-82c6-800466cd88b0
2009-11-24 10:21:30 +00:00
Kevin Easton
3de93b1dbc
Far-reaching changes to make BitchX compatible with 64 bit architectures
...
like x86-64, where sizeof(int) != sizeof (void *). This involves correctly
casting every function pointer from the global table to the correct
function type, which has the added benefit of allowing type-checking of
function arguments and return values.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@26 13b04d17-f746-0410-82c6-800466cd88b0
2008-04-30 13:57:56 +00:00
Kevin Easton
533c3dbcbf
Turn on SVN keyword replacement for $Date$, $Author$, $Revision$, $Id$ for all
...
*.c and *.h files.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/branches/ircii-pana-1.1@3 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:49:14 +00:00
Kevin Easton
28febcfea9
Initial import of the ircii-pana-1.1-final source tree.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:25:32 +00:00