* client/BaseClient.h, client/ClientConnection.cpp,
client/ClientConnection.h, client/ObserverClient.cpp,
client/client.cpp: Clean up the way sockets are handled and errors
are reported.
* configure.ac: Add tests for more optional functions and headers.
* client/ObserverClient.cpp: Use alternative on systems which don't
have usleep().
* common/system.cpp: Implement gettimeofday for systems which don't
have it.
* server/CommListener.cpp: Add a note about supporting alternatives
to inet_ntop.
* server/CommUnixListener.cpp, server/server.cpp: Disable the unix
listen socket on systems which don't have it.
* tests/systemtest.cpp: Fix the test to work on systems without fork()
or kill(), and add a test for the substitute gettimeofday
implementation.
* common/const.h: Remove obsolete config option to disable
range checks and calculations.
* client/ObserverClient.cpp, rulesets/Movement.cpp,
server/Admin.cpp, tools/AdminClient.h, tools/cycmd.cpp:
Remove const.h from files which no longer require it.
* rulesets/Python_API.cpp: Remove python bindings for obsolete
constants.
* rulesets/Thing.cpp, rulesets/World.cpp, server/WorldRouter.cpp:
Remove obsolete rotten code for handling sight without ranges.
* tests/consttest.cpp: Remove tests for removed constants.
* TODO: Note about bug in cyaddrules when adding rules from scratch.
* client/ObserverClient.cpp, client/ObserverClient.h,
client/client.cpp: Add option to allow cyclient to connect to a
remote server.
* tools/AdminClient.cpp, tools/AdminClient.h: Add a timeout so
cyaddrules still works against older servers that don't send an
info op when new types are uploaded.
* tools/cyaddrules.cpp: Add option to allow cyaddrules to connect to
a remote server.
* client/CommClient.h, client/CommClient.cpp, client/ObserverClient.h,
client/ObserverClient.cpp: Prefix members with m_, and remove
pointless inheritance from BaseEntity. Add virtual destructors
as we no longer inherit virtual destructors from BaseEntity.
* client/ObserverClient.cpp: Remove obsolete database include.
* tools/cycmd.cpp: Modify cycmd so it now uses a unix socket connection
for local server by default.
* common/const.cpp, common/const.h: Add a const for the default
admin password hash, with a view to removing the plain text
default admin password.
* server/Persistance.cpp: Ensure that the database contains an
admin account on startup.
* common/Database.cpp: Move the call to register the ID generating
sequence out of the code for creating IG entity tables, as it is
also required by OOG entities, in particular the admin account
bootstrap.
* client/ObserverClient.cpp, client/ObserverClient.h,
client/client.cpp: Modify client so that it no longer attempts to
get account details from the database, or from a hard coded default.
It will now attempt a trusted login, or rely on password provided
by config option.
* server/Lobby.cpp: Add some debugging messages.
* server/CommServer.cpp: Tweak select loop so that closed connections
are cleaned up as soon as they are detected.
* rulesets/World.cpp: Make demo terrain a bit more mountainous.
* Convert entire codebase over to using Atlas-C++ 0.4.90, as
start of transition to 0.6 API.
* client/CommClient.cpp, client/CreatorClient.cpp,
client/ObserverClient.cpp, client/Py_CreatorClient.cpp,
common/BaseEntity.cpp, common/BaseEntity.h,
common/types.h, rulesets/Area.cpp, rulesets/BaseMind.cpp,
rulesets/Character.cpp, rulesets/Entity.cpp,
rulesets/Food.cpp, rulesets/Line.cpp,
rulesets/MemMap.cpp, rulesets/Pedestrian.cpp,
rulesets/Plant.cpp, rulesets/Py_Mind.cpp,
rulesets/Py_Object.cpp, rulesets/Py_Thing.cpp,
rulesets/Python_API.cpp, rulesets/Stackable.cpp,
rulesets/Thing.cpp, rulesets/World.cpp,
server/Account.cpp, server/Admin.cpp, server/CommClient.cpp,
server/CommServer.cpp, server/Connection.cpp,
server/EntityFactory.cpp, server/Lobby.cpp,
server/Persistance.cpp, server/Player.cpp,
server/ServerRouting.cpp, server/WorldRouter.cpp:
Switch to using Element as name for Atlas::Message::Object,
to avoid name clashes on Object, and bring into line with
the way Atlas-C++ will be.
* common/globals.cpp, common/globals.h: Add global variable for
the local state directory.
* server/Account.cpp, server/Admin.cpp, server/Admin.h,
server/Player.cpp: Tighten up some operation checking and add Create
handler to Admin in preparation for handling creation of new OOG
things.
* server/CommLocalClient.cpp, server/CommLocalClient.h,
server/CommRemoteClient.cpp, server/CommRemoteClient.h,
server/CommUnixListener.cpp, server/CommUnixListener.h,
server/CommClient.cpp, server/CommClient.h,
server/CommListener.cpp, server/Connection.cpp,
server/Connection.h, server/server.cpp:
Create new listener and connection classes using unix sockets
to allow local trusted connections.
* client/ClientConnection.cpp, client/ClientConnection.h,
client/CommClient.h, client/CreatorClient.cpp,
client/ObserverClient.cpp: Add capability to connect over
unix socket.
* Use " instead of < when including application headers.
* Re-work the interface between server and worldrouter objects
so that the are less tied together, and more flexible.
* common/globals.cpp: Only persist this sessions command line
options if the user is overriding the installation directory.
* cyphesis.vconf, client/Py_CreatorClient.cpp,
client/Py_CreatorClient.h, client/client.cpp:
Add client functionality to allow diferent scripts to be run to
perform different functions on the server.
* client/CharacterClient.cpp: Add debug option.
* rulesets/Character.h: Make mind operation functions virtual,
so they can be overridden.
* common/BaseWorld.h, server/WorldRouter.cpp,
server/WorldRouter.h: Add server functions to search for
entities by name or type.
* rulesets/Creator.h, rulesets/Creator.cpp: Allow creator to
specify a look without an id to search for entities with
a given name or type.
* client/CreatorClient.cpp, client/CreatorClient.h,
client/ObserverClient.cpp, client/ObserverClient.h,
client/Py_CreatorClient.cpp, rulesets/basic/editor.py,
rulesets/mason/define_world.py:
Add support for looking for entities in the world by name or
type from client script, so client scripts can modify existing
world.
* rulesets/Entity.cpp, rulesets/Movement.cpp,
rulesets/Py_Object.cpp, rulesets/Py_Operation.cpp,
rulesets/Py_Oplist.cpp, rulesets/Python_API.cpp,
rulesets/Stackable.cpp, rulesets/Thing.cpp,
rulesets/World.cpp, server/Account.cpp,
server/CommServer.cpp, server/Connection.cpp,
server/Player.cpp, server/ServerRouting.cpp,
server/server.cpp, tools/cycmd.cpp,
tools/cywatchdog.cpp: Code formatting cleanups.
* rulesets/basic/world/objects/tools/Bow.py: Fix up bow so it now
fires correctly.
* tools/cyloadrules.cpp, server/server.cpp,
aiclient/ClientConnection.cpp, client/ClientConnection.cpp,
common/inheritance.h: Use const iterators and references
whenever possible.
* client/CommClient.cpp, client/CreatorClient.cpp,
client/ObserverClient.cpp, client/Py_CreatorClient.cpp,
common/BaseEntity.cpp, common/BaseEntity.h,
common/types.h, rulesets/Area.cpp, rulesets/BaseMind.cpp,
rulesets/Character.cpp, rulesets/Entity.cpp,
rulesets/Food.cpp, rulesets/Line.cpp,
rulesets/MemMap.cpp, rulesets/Pedestrian.cpp,
rulesets/Plant.cpp, rulesets/Py_Mind.cpp,
rulesets/Py_Object.cpp, rulesets/Py_Thing.cpp,
rulesets/Python_API.cpp, rulesets/Stackable.cpp,
rulesets/Thing.cpp, rulesets/World.cpp,
server/Account.cpp, server/Admin.cpp, server/CommClient.cpp,
server/CommServer.cpp, server/Connection.cpp,
server/EntityFactory.cpp, server/Lobby.cpp,
server/Persistance.cpp, server/Player.cpp,
server/ServerRouting.cpp, server/WorldRouter.cpp:
Switch to using Fragment as name for Atlas::Message::Object,
to avoid name clashes on Object.
* common/BaseEntity.h: Make BaseEntity inherit from SigC::Object,
so signals and callbacks can be used, and add destroyed
signal.
* common/accountbase.h, physics/BBox.h, physics/Quaternion.h,
physics/Vector3D.h, rulesets/MemMap_methods.h,
rulesets/Movement.cpp, rulesets/Plant.h,
rulesets/Py_Operation.cpp, rulesets/PythonMindScript.cpp,
rulesets/PythonThingScript.cpp, rulesets/Script.cpp,
common/inheritance.cpp: Cleaned up Atlas::Message::Object
use, and excessive use of "using ...".
* rulesets/Movement.h, rulesets/Pedestrian.h:
Use forward declarations rather than including Move.h
* server/Account.cpp, server/Account.h, server/Connection.cpp,
server/Connection.h: Use destroyed signal to ensure references
to in game entities are removed when those entities are
destroyed. Ensure Connection is only destroyed once.
* 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.
* client/ObserverClient.cpp, server/Account.cpp, server/Connection.h,
server/Routing.h: Formatting cleanup
* client/Py_CreatorClient.cpp, rulesets/Area.cpp, rulesets/Area.h,
rulesets/Character.cpp, rulesets/Character.h, rulesets/Entity.cpp,
rulesets/Entity.h, rulesets/Line.cpp, rulesets/Line.h,
rulesets/Plant.cpp, rulesets/Plant.h, rulesets/Py_Mind.cpp,
rulesets/Py_Thing.cpp, rulesets/Stackable.cpp, rulesets/Stackable.h:
Replace operator[] with get() method for querying attributes.
Make this get() method const, and re-write the internals so
that it more cleanly handles attributes.
* common/BaseWorld.h: Re-write world.getObject() so that it
no longer uses std::map::operator[], as the old method was
inserting NULLs into the world dictionary when non-existant
entities were queried.
* rulesets/Character.cpp: Clean up outstanding issues when movement
position is supplied, and is very close to being correct, and
clarify comments about movement when neither destination nor
source are provided.
* rulesets/Character.cpp: Modify mind2body interface so that setting
the TO of ops is done in the individual handlers, and copying
the operation globally is avoided.
* rulesets/MemMap_methods.h: Remove dodgy debug code.
* rulesets/Pedestrian.cpp: Clarify movement fixme.
* rulesets/Py_Operation.cpp: Clarify operation time handler fixme.
* rulesets/Stackable.cpp: Clarify fixme's in combine and divide
handlers.
* server/CommServer.cpp: Remove redundant fixme.
* server/Connection.cpp, server/ServerRouting.cpp,
server/ServerRouting.h, server/ServerRouting_methods.h,
server/server.cpp:
Move inline ServerRouting::getObject into class header.
* server/WorldRouter.cpp, server/WorldRouter.h:
Clean up includes, and move updateTime into the main body of the
file. Clean up code formatting when handling maps and dictionaries.
Clarify error output and comments about NULL objects in the world
dictionary.
client/ClientConnection.cpp, common/database.h, common/globals.cpp,
common/persistance.cpp, common/stringstream.h, server/CommClient.cpp,
server/CommServer.cpp, server/Persistance.cpp, tools/cyctrl.cpp,
tools/cyctrl.cpp, tools/cydbload.cpp, tools/cyisoload.cpp,
tools/cypasswd.cpp: Removed unused config.h.
* client/ObserverClient.cpp, common/const.h, tools/cycmd.cpp:
Use default password if the admin account cannot be fetched from
the database.
* client/Py_CreatorClient.cpp, common/BaseEntity.cpp,
common/BaseEntity.h, rulesets/Character.cpp, rulesets/Creator.cpp,
rulesets/Entity.cpp, rulesets/Entity.h, rulesets/EntityFactory.cpp,
rulesets/MemMap.cpp, rulesets/Py_Mind.cpp, rulesets/Py_Thing.cpp,
rulesets/Py_World.cpp, rulesets/Thing.cpp, server/Account.cpp,
server/Admin.cpp, server/Connection.cpp, tools/cywatchdog.cpp:
Make many of the member variables of Entity protected, and add
the required accessors. Changed the name of the id attribute
to m_id.
* common/BaseWorld.h, common/database.cpp, common/persistance.cpp:
Removed unused includes.
* common/Chop.h, common/Cut.h, common/Eat.h, common/Fire.h,
common/Generic.h, common/Load.h, common/Nourish.h, common/Save.h,
common/Setup.h, common/Tick.h: Moved definition of virtual
functions into cpp file, to reduce wasted code.
* common/Makefile.am: Create cyphesis library, which can be used by
other applications to access cyphesis databases.
* common/config.h, common/database.h, server/Persistance.cpp,
tools/cydbload.cpp, tools/cyisoload.cpp, tools/cypasswd.cpp:
Remove conditional compilation of db code. db3 is now required.
* server/WorldRouter.h: Fixed getNewId() so it take const string.
* server/server.cpp: Removed python shutdown, so it does not
mess up the db if it causes a segfault.
Al Riddoch <alriddoch@zepler.org>
* tools/cypasswd.cpp, tools/cycmd.cpp, client/ObserverClient.cpp,
common/accountbase.h Added database delete method, which closes
the database, and make sure it is used.
* server/server.cpp: Moved the point where the server drops to
a daemon, as doing this after the db was open seems to corrupt
the db.
* common/database.cpp: If a db is opened but not created, then it
is read only.
Al Riddoch <alriddoch@zepler.org>
* client/CreatorClient.cpp: Fixed processing the response
to a create operation, and cleaned up debugging output.
* client/ObjserverClient.cpp, client/ObserverClient.h,
client/client.cpp: Added setup method, which which handles
connecting, negotiation, logging in and creating character.
* client/Py_CreatorClient.cpp: Added check if make() failed.
* rulesets/Python_API.cpp: Fixed setting the import hooks
list properlly to include the ruleset list in use, instead
of hardcoding it.
* rulesets/acorn/define_world.py: Copied define_world.py script
from client directory for Acorn.
* rulesets/basic/editor.py: Modified to be used from C++ core.
* rulesets/basic/mind/goals/__init__.py,
rulesets/basic/mind/goals/humanoid/werewolf.py:
Added in goals file to contain goals related to werewolf.
* rulesets/basic/mind/panlingua/interlinguish.py:
Added in vote and execute verbs for werewolf.
* rulesets/werewolf: Added in new ruleset for werewolf.
Al Riddoch <alriddoch@zepler.org>
* server/Player.cpp: Arg order of std::string.compare() is
incompatable between recent libstdc++ versions. Switch
back to old version, still in most common use.
* rulesets/Thing.cpp: Set refno on ops handled in game.
* rulesets/Python_API.cpp: Modify Entity() python constructor
so that commonly used attributes from old atlas are translated
to their modern equivalents.
* rulesets/Py_Thing.cpp, rulesets/Py_Mind.cpp: Differentiate
between previously identical error messages in several places.
* rulesets/Py_Object.cpp: Rework conversion of python dict to
Atlas map to be more efficient and clean.
* rulesets/Py_Location.cpp: Rework setting of vector parts of
location so that it can accept vectors from python in more
formats, including lists and tuples.
* rulesets/Creator.h, rulesets/Character.h, common/BaseEntity.h:
Re-order virtual methods declarations to fit a convention.
* common/stringstream.h: Hardcode use of local stringstream class,
as the version provided with older libstdc++ seems to be broken.
* common/database.cpp: Use the common header to pick the right
stringstream implementation.
* common/BaseWorld.cpp, server/Persistance.cpp: Removed unused
stringstream include.
* rulesets/Creator.cpp: Added extra debug output.
* client/define_world.h, client/define_world.cpp, client/CommClient.h:
Use CreatorClient to store Creators mind, instead of BaseMind.
* client/client.cpp,
client/ObserverClient.h, client/ObserverClient.cpp,
client/CreatorClient.h, client/CommClient.h, client/CommClient.cpp:
Modify method names to fit capitalisation conventions.
* client/CreatorClient.cpp: Implement creation of in-game entities,
using creator entity.
* client/CommClient.cpp: Added correct client side monitoring of
creator entity.
* client/ClientConnection.h, client/ClientConnection.cpp: Added
pending method to establish if ops are in the queue. Switched send()
method so we only send ops. Add setting of serialno of sent
ops, starting with an offset of 512.
* client/CharacterClient.h: Removed unused member, opFound.
* client/CharacterClient.cpp: Debugged sendAndWait() method.
Al Riddoch <alriddoch@zepler.org>
client/ObserverClient.cpp, client/ObserverClient.h,
client/ClientConnection.cpp, client/ClientConnection.h,
client/define_world.cpp, client define_world.h:
Started re-coding of python client code in C++.
* common/accountbase.h:
Database class used for simply accessing accounts.
* common/OOGThing.cpp, common/OOGThing.h, server/Account.h,
server/Routing.h:
Moved OOGThing class into common as it is not server specific.
* common/BaseWorld.cpp, common/BaseWorld.h,
server/WorldRouter.cpp, server/WorldRouter.h,
rulesets/Entity.h, rulesets/Py_World.cpp,
rulesets/PythonThingScript.cpp, rulesets/Python_API.h,
rulesets/Thing.cpp, rulesets/Thing.h:
Added base class for WorldRouter so that code that previously
used WorldRouter now used the interface defined by this
new class. This means that the code in rulesets no longer
has dependencies on code in server, so can be used in the client.
* server/ExternalMind.cpp, server/ExternalMind.h,
rulesets/Character.h, rulesets/Creator.cpp,
server/Account.cpp:
Moved ExternalMind class into server as it is server specific,
so that there is no dependancy on server in rulesets.
* server/Persistance.cpp. server/Persistance.h,
server/Admin.cpp, server/ServerRouting.cpp, server/server.cpp:
Moved high level server specific persistance class into
server, so there is no dependency on server in common.
* common/database.cpp, common/database.h, server/Admin.cpp,
tools/cydbload.cpp, tools/cyisoload.cpp, tools/cypasswd.cpp:
Increases efficiency of some interfaces by passing Object::MapType
instead of MapType, when the value must be a map.
* modules/WorldTime.cpp, modules/WorldTime.h,
rulesets/Py_WorldTime.cpp, rulesets/Python_API.cpp:
Brought the version of WorldTime in modules up to date, as this is
the version now used.
* rulesets/Character.cpp, server/WorldRouter.cpp, rulesets/Thing.cpp,
server/Admin.cpp:
Made world objects dictionary private.
* rulesets/EntityFactory.cpp, rulesets/EntityFactory.h:
Change newThing parameters so entity factory does not need to
know about WorldRouter.
* server/Lobby.cpp: Added support for people and rooms attributes
of OOG room class.
Al Riddoch <alriddoch@zepler.org>