A fractional-second timeout was already supported for the initial timeout of a /TIMER, but
if the timer was recurring then the interval was rounded to a whole number of seconds for
the subsequent timeouts.
Change the type of interval from long to double to fix this.
This flag is for tracking if we've sent a KICK for a nick. It means we can avoid
sending duplicate KICKs (eg for floods, channel protection etc).
MODULE_VERSION is bumped because NickList is a struct exported to modules.
This change means that struct.h no longer needs to include alist.h, so it will be indirectly included in a lot
fewer other files.
As a consequence, server.h needs to include notify.h to get the definitions of those data types.
This adds a FLOOD_FLAG() macro to convert a _FLOOD constant to the appropriate flag. For now this just
casts the argument to unsigned int.
Rename Flooding.type to Flooding.flags and change it to unsigned int, to reflect that it's a bitfield of
flags for multiple flooding types.
The static 'pos' variable in check_flooding() would not stay in sync with the number of entries in
flood_list after clean_flood_list() was called. This meant that check_flooding() would always end up
removing all previous entries if it tried to add a new one.
Fix this by removing the tracking of number of flood_list entries, and just removing stale ones (older
than /SET FLOOD_RATE).
Only include <netinet/in.h> and <sys/socket.h> if the system supplies them.
This is necessary to try and get the mingw32 build working again.
No need to include <sys/types.h> and <netinet/in.h> from cdns.c - these are
already included by <irc.h>.
This fixes a bug where the cached channel log level bitmask was not correctly set unless you did a
/cset CHANNEL_LOG_LEVEL after the channel had been joined, which resulted in most things not being
logged.
It makes most sense to cache the bitmask within the cset structure, and there was even an (ununsed)
field already there for it.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@512 13b04d17-f746-0410-82c6-800466cd88b0
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