Chris Porter [Thu, 22 Nov 2007 16:17:09 +0000 (16:17 +0000)]
bump version number
replace settings table with a more useful settings table
version reply is now stored in the settings table
sanitise the input for phrase names and version replies
Chris Porter [Wed, 31 Oct 2007 11:58:08 +0000 (11:58 +0000)]
esockets now supports new protocol.
Rewritten all the parsers, now using dynamic memory allocation, it's a lot less efficient (well, if allocating 16 bytes is a problem), but it's a LOT simpler.
Need to add limits to prevent people using all the RAM.
Avoid triggering invalid HOOK_CHANNEL_CREATE or HOOK_CHANNEL_JOINs
When a channel is created in response to a join or create, we send out the
HOOK_CHANNEL_NEWCHANNEL message. Some things (e.g. Q9) might choose to
kick the user off, thus destroying the channel, in response to this. In
such an event, sending HOOK_CHANNEL_CREATE or HOOK_CHANNEL_JOIN out with
a now invalid channel pointer can cause trouble, so don't do it.
Note there is the potential problem that the chanindex * can become
"invalid" when the channel is destroyed; in practice this should not be a
problem because (a) Usually something else will be hanging off the chanindex
if it has decided to kick the user out! and (b) chanindex's are allocated
using a recycling pool allocator, so even if the chanindex has been free'd
it will still be a valid pointer.
Added capability to pqsql module to use default unix socket.
Updated pqsql so that if a host of "UNIX" is specified it will not pass
hostname/port information to the connect call, causing the postgres library
to fall back on the default unix domain socket. This avoids the need to
specify the unix socket path in the newserv config file - desireable since
it can vary depending on the postgres installation.
The comparison is case sensitive so if your DB host is really called "unix"
then specifying the name in lowercase will cause it to connect via tcp as
before.
Also made "UNIX" the default hostname.
Also included the strlfunc.h to remove a compiler warning.
Paul [Sun, 1 Jul 2007 13:59:23 +0000 (13:59 +0000)]
add pqlasterror function for returning connection errors e.g.:
[2007-07-01 13:49:36] info(pqsql): Attempting database connection: host=localhost port=431 dbname=newserv user=newserv password=moo
[2007-07-01 13:49:36] error(pqsql): Unable to connect to db: could not connect to server: Connection refused Is the server running on host "localhost" and accepting TCP/IP connections on port 431?
[2007-07-01 13:49:36] info(core): Loaded module pqsql OK.
splidge [Tue, 5 Jun 2007 22:16:02 +0000 (23:16 +0100)]
Newsearch overhauled.
Removed the confusion of having both a return type specified in each node
and the return type being passed in on execute.
Now each node should always return the type indicated in its "returntype"
member. Nodes who want its callees to return a certain type can call the
new "coerceNode()" to insert a conversion node as necessary to convert
types. Note that coerceNode() has no overhead if the node already returns
the correct type.
The "type" parameter passed to search execute functions has been removed.
All existing modules have been rewritten to honour these rules, in a lot of
cases this means ripping out useless code to return different types (and as
a side-effect it has fixed all problems where a node was unable to correctly
return some types). Sadly some nodes (eq, lt, gt) have got a bit messier as
they now need to coerce each subsequent parameter to match the type of the
first parameter.
Also fixed up some of the channel nodes to just return the relevant piece of
data rather than a BOOL acquired by performing some arbitrary operation on
that data.
Added the (length) function which returns the length of its input string.
Removed the (namelen) function as you can now call (length (name)) - or, to
reproduce the old function, (gt (length (name)) <constant>) which will
return all channel names above a constant length.
splidge [Mon, 4 Jun 2007 10:22:58 +0000 (11:22 +0100)]
Make burst joins work properly for -j channels.
With the change to the bursting logic it's now OK to have chanflag -j
channels set +ik - legit users can start the channel, other users are
netrider kicked.
splidge [Mon, 4 Jun 2007 10:09:57 +0000 (11:09 +0100)]
Tidied up the joining behaviour a bit.
A few changes:
* Burst with the default modes as well as the forcemodes (unless some of
the default modes are denied, of course).
* If there's only one user on the channel and they are known, don't burst
with +i or +k - this avoids kicking the users off their own channels.
Obviously if the user isn't known they shouldn't be joining so we leave
the modes set to get rid of them
* Ripped out the #ifdef 0'd code that used to try and deal with imposters -
there is no need for this now that we can burst into channels.