* 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/log.h, common/log.cpp: Expose a new function to set up the
event log system for testing.
* tests/logtest.cpp: Add test cases for the event log calls.
* common/log.h, common/log.cpp: Some systems have defines in their
headers which conflict with cyphesis log levels, so make sure they
are undefed before the enum, and add more tightly namespaced
versions for files which need those headers. Adapt the logging
code for systems without syslog() or reentrant localtime().
* common/log.h, common/log.cpp: Add a new function to rotate
the logs, eliminate duplicate code by breaking out log opening
code into a static function.
* common/system.cpp: Add a HUP system call handler to rotate the logs.
* 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.
* common/log.cpp, common/log.h: Add a new logging function to log
errors from libc.
* server/CommListener.cpp, server/CommServer.cpp: Use new function
rather than perror for logging libc errors.
* server/Makefile.am: Move cyslave into EXTRAs so that its not
built by default.
* server/CommListener.cpp: Check that listener is open before using
it.
* common/log.h, common/log.cpp: Add log levels for output from
scripts.
* rulesets/Python_API.cpp: Add new python objects which replace
sys.stdout and sys.stderr, and redirect output to the
cyphesis logging mechanism.
* ALL: Cleaned up headers into correct order.
* common/log.h, common/log.cpp: Write some logging code which
handles message of different types using syslog or standard
error, depending on whether we are running as a daemon.
* ALL: Switched to using log() for all output.
atlas object inheritance tree.
* server/Connection.cpp: Added code to allow client to query
atlas object inheritance using get ops.
* example/client/InheritanceClient.*: Added example client which
queries the inheritance tree of the server.
* rulesets/MemMap.h, rulesets/Py_Map.cpp: Made hooks lists private,
and added methods to access them.
* server/Account.cpp, server/Lobby.h: Added correct handling of OOG
look ops when looking at own characters, other accounts, or the
lobby.
* server/ServerRouting.h: Added function to generate serial numbers
for operations.
* server/WorldRouter.cpp: Assign genuine serial number to all
in game operations as they are pulled off the queue.
* Cleaned up header file multiple inclusion checks for uniqueness,
and made sure of ISO compliant use of std::string.
Al Riddoch <alriddoch@zepler.org>
* */*: Fixed mistake in copyright statement.
* tools/cypasswd.cpp: Fixed usage message.
* tools/cycmd.cpp: Added tools for sending administrative commands
to server.
* server/server.cpp: Send terminate instruction to metaserver on
server shutdown.
Al Riddoch (alriddoch@zepler.org)
* modules/Location.h: Added inRange() method which can be used
to check whether location, including bounding box, is within
given range of a given location. Changed parent member
variable to ref to fit with Atlas spec. Changed all code
related to using the term ref instead of parent so
that there is no confusion between ref for coordinates
and parent in the Atlas hierarchy.
* rulesets/Thing.cpp: Added code to move operation to check
what entities come into and out of range when entity moves.
Appearance and Disappearance operations are sent to the
moving entity with a list of the relevant entities as their
argument.
* server/WorldRouter.h/cpp: Added overloaded Look operation
handler which applies range constraints to the contains
attribute before returning.
* common/BaseEntity.h, rulesets/Thing.h, rulesets/Character.h:
Added handling of Appearance and Disappearance operations.
* server/WorldRouter.cpp: Added primitive check to broadcast
operations to avoid delivering broadcast operation to
entities out of range.
* Removed world.get_object() use from server python code, as
its use is not required.
* server/WorldRouter.h: Implemented fetching of floating point time
from the OS so movement is much smoother.
Al
* Throughout entire code base:
Removed all obsolete code and commented out code relating to porting
from python. Removed interim data types bad_type and None. Added
const throughout where apropriate. Change various flags to bool
type. Removed unused members.
* Added TODO list.
Al
log.
* Added in lots of deletes to sort memory leaks.
* More python tweaks.
* Implemented status attributes of thing.
* Re-wrote some code which needlessly creates objects in the
free store.
Very nearly all works now.
TODO:
Tidy some of the rest of the leak handling, including all of the stuff
to deal with connections going down.
Sort out how mind gets its attributes set and updated.
Sort out iritating python error in init of Vector3D
delete oplists in OplistObjects. The pointers are never passed back.
Al