The idea here is that if you have a module which implements a new DCC type that is essentially
a lightly-modified version of CHAT or SEND you can reuse these functions.
This function gets the status of a single umode flag identified by umode char rather than
internal server flag number.
This also lets us remove all the USER_MODE* constants because they're no longer required.
Invert the sense of the +w check in e_wall() - we only echo our OPERWALL if we're *not* +w,
because if we are +w then the server will echo it back to us anyway.
The idea here is not to expose the internal server implementation for storing umodes,
but instead have callers just work in terms of umode characters.
The 'possible umodes' have always been the same for all servers anyway. We just assume
that [a-zA-Z] is the bounding set.
Remove the 'how' parameter to rsindex(), making it reverse-search for only the first matching character,
as sindex() already does. There are only two callers, and one already passed a hardcoded value of 1.
Also change rsindex() so that it starts searching at the character BEFORE the passed in position. This
makes it easier to repeatedly call rsindex() in a loop to search for the Nth matching character, and
also fixes a technical instance of undefined behaviour where a pointer is decremented to point before
the start of the string.
Remove the 'mark' parameter to strsearch(). Instead, always forward-search from the beginning of the
string and reverse-search from the end of the string, as this is what the two callers want anyway.
Bump the module ABI version because these functions are exported to modules.
The removed variables are:
dll_functions
dll_numeric
dll_commands
dll_variable
dll_ctcp
dll_window
These are not actually directly used by any modules, and hiding them allows us to more easily
change their implementation later.
This helper function is for modules to save the contents of their module variables to a file
as SET commands.
It will remove the need to export the raw dll_variable list to modules.
The guts of this function doesn't need to be in server.c - it only uses extern server functions so it
makes sense just to move it into the body of function_servers(), the only caller.
That means it's no longer accessible for loadable modules, but it isn't much use for them anyway. They
can always directly access the server list if they need that info.
(Requires rolling the module table version).
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.
Tokens that begin with two underscores __* or an underscore and an uppercase letter _X* are reserved,
so we should avoid those for our own include guards. The standard I'm settling on for foo.h is FOO_H_.
per-server, and apply new version of do_oops from flewid (the BX2 version).
This means that /oops, "/query .", "/query ,", "/msg ." and "/msg ," are now
per-server, along with the $. $, and $B aliases.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@87 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