* common/Identified.cpp, common/Identified.h:
Flatten down the base classes into one called Router.
* client/CharacterClient.cpp, client/CreatorClient.cpp,
rulesets/BaseMind.cpp, rulesets/Character.cpp,
rulesets/Creator.cpp, rulesets/Entity.cpp,
rulesets/LocatedEntity.cpp, rulesets/MemEntity.cpp,
rulesets/Plant.cpp, rulesets/Stackable.cpp,
rulesets/Thing.cpp, rulesets/World.cpp,
server/Account.cpp, server/Admin.cpp,
server/Connection.cpp, server/ExternalMind.cpp,
server/Lobby.cpp, server/Master.cpp,
server/Peer.cpp, server/Player.cpp,
server/ServerRouting.cpp, server/SlaveClientConnection.cpp,
server/TrustedConnection.cpp, tests/LocatedEntitytest.cpp,
tests/ThingupdatePropertiestest.cpp: Update all the operation
routing classes to use the modified base class correctly.
* server/ExternalMind.h, server/ExternalMind.cpp: Improve the
interface to make it cleaner, and add a way to track the time
at which the character lost it's connection to the client.
* server/Connection.cpp: Change to use the cleaner ExternalMind
interface.
* server/ExternalMind.h: Make all the member variables protected,
and create an API to expose as needed.
* server/Connection.cpp: Update the code to use the interface to
interact with ExternalMind.
* common/Identified.cpp, common/Identified.h, rulesets/Character.h,
rulesets/LocatedEntity.h, server/Account.h, server/Admin.cpp,
server/CommClient.cpp, server/CommClient.h, server/Connection.cpp,
server/Connection.h, server/ExternalMind.h,
server/ExternalProperty.cpp, server/ExternalProperty.h,
server/Lobby.h, server/Master.h, server/Peer.h,
server/ServerRouting.h, server/SlaveClientConnection.h:
Rename IdentifiedRouter to Router as it's the base class
for pretty much all routers.
* rulesets/Creator.cpp: Remove code for removing Creators once
they've been disconnected, and simply mark them as ephemeral.
* server/ExternalMind.h, server/ExternalMind.cpp: Change
the external mind so it stores a reference to the character it
is the mind for, and stores a pointer to the connection rather
than a reference so it can be nulled when the connection is
removed on unsubscribed. Implement removing an ephemeral avatar
character on disconnection.
* server/Connection.cpp: Re-work the connection code to deal with
a character still having an external mind on connection, and not
removing the external mind at disconnection.
* client/BaseClient.cpp, common/BaseEntity.cpp, common/BaseEntity.h,
common/Identified.cpp, common/Identified.h, common/Makefile.am,
common/OOGThing.cpp, common/OOGThing.h, common/OperationRouter.cpp,
common/OperationRouter.h, rulesets/Character.h, rulesets/Entity.h,
rulesets/LocatedEntity.cpp, rulesets/LocatedEntity.h,
server/Account.cpp, server/Account.h, server/Admin.cpp,
server/CommClient.cpp, server/CommClient.h, server/Connection.cpp,
server/Connection.h, server/ExternalMind.cpp, server/ExternalMind.h,
server/ExternalProperty.cpp, server/ExternalProperty.h,
server/Lobby.cpp, server/Lobby.h, server/Master.cpp, server/Master.h,
server/Peer.cpp, server/Peer.h, server/ServerRouting.cpp,
server/ServerRouting.h, server/SlaveClientConnection.cpp,
server/SlaveClientConnection.h: Factor out the more pointless base
classes, in favor of simple interface. Move destroyed signal to
Entity, which is the only place it is needed.
* common/Identified.cpp, common/Identified.h: Add a new base class
which combines Identified with OperationRouter.
* server/CommClient.cpp, server/CommClient.h: Modify CommClient to
refer to it's operation routing object purely by the OperationRouter
interface.
* server/Connection.cpp, server/Connection.h,
server/TrustedConnection.cpp: Re-factor connection routers so
they no longer inherit from BaseEntity, and instead inherit
cleanly from the minimum required interfaces.
* server/Admin.cpp, server/Connection.cpp, server/Connection.h,
server/ServerRouting.cpp, server/ServerRouting.h: Use the much
simpler OperationRouter interface when handling routing operations
round the server.
* common/BaseEntity.cpp, common/custom.cpp, common/inheritance.cpp,
common/inheritance.h, common/op_switch.h, common/types.h,
rulesets/Character.cpp, rulesets/Creator.cpp,
rulesets/PythonThingScript.cpp, server/Account.cpp,
server/Connection.cpp, server/ExternalMind.cpp,
tests/OOGThingtest.cpp, tests/inheritancetest.cpp:
Remove a set of pointless definitions, and use the originals
throughout the code.
* common/OperationRouter.cpp, common/OperationRouter.h: Interface
class for objects when can handle or route operations.
* common/BaseEntity.h, common/BaseEntity.cpp: Remove standard
implementation of operation handler, forcing class to provide
more specific implementations.
* rulesets/LocatedEntity.h, rulesets/LocatedEntity.cpp: Add an
implementation of the OperationRouter interface, suitable for
IG operations.
* server/ServerRouting.h, server/Peer.cpp, server/Peer.h,
rulesets/MemEntity.h: Add placeholder OperationRouter
implementations.
* server/Connection.cpp: Update OperationRouter implementation to
be better suited.
* server/Account.cpp, server/Account.h: Implement OperationRouter
for accounts.
* client/BaseClient.cpp, client/CharacterClient.cpp,
client/CharacterClient.h, client/CreatorClient.cpp,
client/CreatorClient.h, rulesets/BaseMind.cpp, rulesets/BaseMind.h,
rulesets/Character.cpp, rulesets/Entity.cpp, rulesets/Entity.h,
rulesets/MindFactory.cpp, rulesets/MindFactory.h, rulesets/Thing.cpp,
rulesets/World.cpp, server/Account.cpp, server/Connection.cpp,
server/EntityFactory.cpp, server/Persistor.cpp,
server/Persistor_impl.h, server/Restorer_impl.h,
server/WorldRouter.cpp: Remove the hard name attribute, now that
most entities don't set it.
* common/log.cpp, common/log.h, common/BaseEntity.cpp,
common/BaseEntity.h: Switch to taking a C++ string reference rather
than a char *, for the rest of the logging and error related
calls.
* common/Database.cpp, common/log.cpp, common/log.h,
rulesets/PythonMindScript.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, server/Player.cpp,
tools/cyisoload.cpp: Convert over to using the new API correctly.
* common/log.cpp, common/log.h: Switch to taking a C++ string reference
rather than a char *, as it is not really an optimisation, and it
makes the code simpler to read and write.
* client/BaseClient.cpp, client/ClientConnection.cpp,
common/AtlasFileLoader.cpp, common/BaseEntity.cpp,
common/Database.cpp, common/globals.cpp, common/id.cpp,
common/inheritance.cpp, common/log.cpp, common/log.h,
rulesets/Character.cpp, rulesets/Creator.cpp, rulesets/Entity.cpp,
rulesets/MemMap.cpp, rulesets/Motion.cpp, rulesets/Pedestrian.cpp,
rulesets/Py_Object.cpp, rulesets/Py_RootEntity.cpp,
rulesets/PythonMindScript.cpp, rulesets/PythonThingScript.cpp,
rulesets/Python_API.cpp, rulesets/Thing.cpp, server/Account.cpp,
server/Admin.cpp, server/ArithmeticFactory.cpp,
server/CommClient.cpp, server/CommListener.cpp,
server/CommMDNSPublisher.cpp, server/CommServer.cpp,
server/Connection.cpp, server/EntityFactory.cpp,
server/Persistance.cpp, server/Restoration.cpp,
server/ScriptFactory.cpp, server/TaskFactory.cpp,
server/WorldRouter.cpp, server/server.cpp: Convert over to using
new API correctly.
* data/mason.xml: Add biomass and transient to fircone, making its
script obsolete:
* common/globals.cpp, common/globals.h: Add a config flag
to control whether database code is enabled.
* server/EntityFactory.cpp, server/EntityFactory.h,
server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h, server/Persistor.cpp:
Re-work the persistence code so that persistent or non-persistent
versions of entity factories are installed at startup, removing
the need to check whether the database is enabled during
runtime.
* common/newid.cpp, server/Connection.cpp, server/server.cpp:
Replace the const that used to control whether the database
was used with the config flag.
* rulesets/Entity.h, rulesets/Entity.cpp: Set argument names on
some methods. Add a new method allowing a property to be set
externally.
* server/ExternalProperty.cpp, server/ExternalProperty.h: Add a new
property which reflects whether an entity is connected to the
outside world via an external mind.
* server/Connection.cpp, server/Connection.h: Add a new method which
hooks up an avatar to the connection, installing an ExternalProperty
if necessary.
* server/Account.cpp: Use the new Connection method to hook up
existing avatars.
* server/Connection.h, server/Connection.cpp: Change disconnectObject
to removePlayer to make it clearer what the return value means,
and return a pointer to the removed object if it is a player account.
* server/Connection.cpp: When removing an account which has been
logged out, remove all its characters which are not currently in
use from the connections list.
* server/Connection.h, server/Connection.cpp: Move the code that
decouples an object from the subscribed connection into its
own function, so the same code is invoked from two different
places.
* rulesets/Entity.cpp, server/Account.cpp, server/Admin.cpp,
server/Connection.cpp, server/EntityFactory.h,
server/Persistor_impl.h, tools/cycmd.cpp:
Switch from using deprecated sigc++ 1.2 headers to the right
sigc++ 2.0 equivalents.
* common/BaseEntity.cpp, rulesets/Character.cpp, rulesets/Creator.cpp,
server/Account.cpp, server/Admin.cpp, server/Connection.cpp,
server/Lobby.cpp, server/WorldRouter.cpp: Don't bother with serial
numbers on ops generated inside the server. They just leak and upset
clients.
* server/Connection.cpp, server/CommClient.cpp, server/Account.cpp:
Only set refnos on ops if the client has set a serial number.
* rulesets/Character.cpp: Simplify handling the transfer of
operations from client to in-game. Don't give new operations
serial numbers at this point.
* common/system.cpp: Return 0 on security check fail, as -1 is
signed.
* server/Connection.cpp: Re-order logging messages so that messages
reflect the fact the a broken connection occurs before the
subscriptions associated with that connection can be dropped.
Implement logging out just specific objects without closing the
connection.
* common/Database.cpp, common/newid.cpp, server/server.cpp:
Modify new ID checks so that code still runs when database is
unavailable, and events requiring new IDs fail cleanly.
* server/Connection.cpp: Report a failure to create a player
account if no ID available.
* rulesets/BaseMind.cpp: When processing appearance ops, handle
stamp more efficiently, report an error if ID is missing
from argument.
* server/IdlePSQLConnector.cpp, server/IdlePSQLConnector.h:
Implement re-connecting to the Database if connection is lost.
* rulesets/Character.cpp, rulesets/Entity.cpp, rulesets/Thing.cpp:
Ensure STAMP is present on appearance op args.
* server/CommListener.cpp, server/CommListener.h,
server/CommPeerListener.cpp, server/CommPeerListener.h,
server/CommSlaveListener.cpp, server/CommSlaveListener.h,
server/CommUnixListener.cpp, server/CommUnixListener.h:
Add a return value to method for creating new client socket
objects, and use it to return failure if no ID is available
from the database for a new object.
* rulesets/Py_Point3D.cpp, rulesets/Py_Vector3D.cpp,
rulesets/Python_API.cpp: Add "new" method for class wrappers, and
call the in place constructor from new rather than init. Re-write
internal function for creating new instances so it uses the "new"
method.
* rulesets/Py_Statistics.cpp: Remove some obsolete code inadvertedly
copied from another file. Comment out some unused code to get rid
of a warning.
* server/CommPSQLSocket.cpp: Clear the database connection from
destructor.
* tests/python_class.cpp: A new test for experimenting with new
Python wrappers.
* common/custom.cpp: Add a "task" base class to the inheritance tree.
* server/EntityFactory.h, server/EntityFactory.cpp: Add
functionality to allow task rules to be installed and updated from
an admin client. Improve the error reporting for a number of error
conditions.
* server/Connection.cpp: Correct the copyright dates.
* server/Admin.cpp: Improve error reporting for a number of error
conditions. Remove obsolete commented out code for installing
rules using Set ops, and add error notification when the
admin client attempts to update an op definition. Allow the
admin client to install an op definition.
* common/BaseEntity.h, common/BaseWorld.h, common/Property.h,
modules/Location.h, rulesets/Entity.cpp, rulesets/Entity.h,
server/Account.cpp, server/Account.h, server/Admin.cpp,
server/Admin.h, server/Connection.cpp, server/Connection.h,
server/Persistor.cpp, server/Persistor.h, server/Persistor_impl.h,
tools/cycmd.cpp: Update usage of sigc++ to the native 2.0 API
rather than the deprecated compatability API. Eleminate the
manual disconnection code for deleted objects, as this is now
handled automatically by sigc::trackable.
* common/log.cpp, server/Account.cpp, server/Connection.cpp,
server/server.cpp: Make server logs much more machine readable
by removing stray colons, standardising field semantics, and
cleaning up messages.
* data/mason.xml: Make skeleton playable.
* server/Connection.cpp: Differentiate in the event logs between
account creation and login to an existing account.
* server/Account.cpp: Move character creation logging to a place
where the information is easier to get to.
* server/Connection.cpp: Add logging of taking existing character.
* common/log.h, common/log.cpp: Add logging function for logging
regular server activity, for statistics purposes, to a file.
* server/Account.cpp, server/Connection.cpp, server/server.cpp:
Add log calls to recall typical events.
* tools/cycmd.cpp: Set a name on the admin agent avatar.