Commit graph

245 commits

Author SHA1 Message Date
Al Riddoch
0fbfc771ad 2003-08-07 Al Riddoch <alriddoch@zepler.org>
* 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.
2003-08-07 23:03:26 +00:00
Al Riddoch
661e208f6d 2003-07-21 Al Riddoch <alriddoch@zepler.org>
* common/Database.h, server/Account.cpp, server/Account.h,
	  server/Admin.h, server/Connection.cpp, server/Player.h,
	  server/WorldRouter.cpp: Change the form of the getEntityId()
	  method in the database code and re-work the code that uses it.

	* common/Database.cpp, common/Database.h: Use PQClear() to free
	  up database result objects, and provide a method to
	  free the contents of a DatabaseResult instance.
2003-07-21 09:37:58 +00:00
Al Riddoch
3fc87290fa 2003-06-15 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp, rulesets/Entity.cpp: Add the assert header
	  where required.
2003-06-15 01:08:33 +00:00
Al Riddoch
718a5eb5c9 2003-05-28 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Refuse to create an account if this
	  connection already has one.
2003-05-28 23:13:44 +00:00
Al Riddoch
88bb8c6a42 2003-05-04 Al Riddoch <alriddoch@zepler.org>
* Clean up member variable names.
2003-05-04 18:31:38 +00:00
Al Riddoch
f3f73897e3 2003-05-03 Al Riddoch <alriddoch@zepler.org>
* server/Restoration.cpp: Send restored entities a setup op, so the
	  AI gets initialised as if the entity had just been created.

	* Clean up member variable names.

	* rulesets/mason/mind/SkelMind.py: Get skeleton to recognise
	  settlers.
2003-05-03 19:52:41 +00:00
Al Riddoch
34ee42318d 2003-04-22 Al Riddoch <alriddoch@zepler.org>
* rulesets/Thing.cpp, server/Account.cpp, server/Admin.cpp,
	  server/Connection.cpp, server/Lobby.cpp: Make setting
	  op args more efficient.
2003-04-22 22:19:25 +00:00
Al Riddoch
2d7b91cfec 2003-04-19 Al Riddoch <alriddoch@zepler.org>
* server/CommServer.h: Prevent copying of CommServer.

	* server/Connection.cpp: Handle setting args more efficiently.
2003-04-19 22:14:22 +00:00
Al Riddoch
b24ad0c18a 2003-03-22 Al Riddoch <alriddoch@zepler.org>
* 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.
2003-03-23 00:55:09 +00:00
Al Riddoch
e530394865 2003-03-22 Al Riddoch <alriddoch@zepler.org>
* common/system.h, common/system.cpp: Add code to md5 hash
	  strings, like passwords.

	* server/Connection.cpp: Use md5 hash code for storing and
	  verifying passwords.
2003-03-22 17:00:04 +00:00
Al Riddoch
26633cf574 2003-03-21 Al Riddoch <alriddoch@zepler.org>
* client/Py_CreatorClient.cpp, common/BaseEntity.cpp,
	  common/BaseEntity.h, rulesets/MemMap.cpp, rulesets/Py_Mind.cpp,
	  rulesets/Py_Thing.cpp, rulesets/Thing.cpp, rulesets/Thing.h,
	  server/Account.cpp, server/Admin.cpp, server/Connection.cpp,
	  server/Lobby.cpp, server/ServerRouting.cpp:
	  Use a more efficient technique to set the attributes on
	  operation arguments without a copy.

	* common/BaseEntity.cpp, rulesets/Entity.cpp, rulesets/Thing.h,
	  rulesets/World.cpp, server/WorldRouter.cpp:
	  Move handling IG Look ops into the IG code in rulesets.
2003-03-21 00:04:53 +00:00
Al Riddoch
d6b59aad1c 2003-03-18 Al Riddoch <alriddoch@zepler.org>
* server/Connection.h, server/Connection.cpp: Add virtual method
	  to verify account credentials.
2003-03-18 11:04:07 +00:00
Al Riddoch
4f3148695d 2003-03-16 Al Riddoch <alriddoch@zepler.org>
* 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.
2003-03-16 21:26:06 +00:00
Al Riddoch
15ef748518 2003-03-07 Al Riddoch <alriddoch@zepler.org>
* 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.
2003-03-07 00:22:12 +00:00
Al Riddoch
d30400de55 2003-01-05 Al Riddoch <alriddoch@zepler.org>
* common/Database.cpp, common/Database.h: Modify relation
	  table create query to allow different types of relation,
	  with constraints to be added. Implement function to
	  add rows to a relation. Modify result iterator constrcter
	  so it returns end() if the result is empty.

	* server/Persistance.cpp, server/Persistance.h: New methods
	  to handle populating a newly restored account object
	  with characters, and syncing newly created characters to
	  the relation that links them with their account.

	* server/Account.cpp, server/Account.h: New method to
	  add existing characters to this account. Inform persistance
	  system when we get a newly created character.

	* server/Connection.cpp: Ask persistance system to populate
	  newly restored account with its characters.
2003-01-05 19:55:52 +00:00
Al Riddoch
562cd2a7ce 2003-01-05 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp, server/ServerRouting.h:
	  Rename function for querying account by its name.

	* server/Persistance.cpp, server/Persistance.h: Remove obsolete
	  function for loading Admin account.
2003-01-05 15:26:07 +00:00
Al Riddoch
5ef716948f 2003-01-05 Al Riddoch <alriddoch@zepler.org>
* common/globals.cpp, common/globals.h, server/Connection.cpp,
	  server/Persistance.cpp, server/Persistance.h, server/ServerRouting.cpp,
	  server/server.cpp: Move restricted flag out of persistance into
	  globals.

	* server/Account.h, server/Admin.cpp, server/Connection_methods.h,
	  server/WorldRouter.cpp: Remove unnecessary includes.

	* server/ServerRouting.cpp: No longer necessary to load the admin
	  account at startup. Can be loaded on demand.
2003-01-05 01:28:49 +00:00
Al Riddoch
ec6d52e45d 2002-01-02 Al Riddoch <alriddoch@zepler.org>
* common/Database.h: Declaration for register relations.

	* server/Account.cpp, server/Account.h, server/Admin.cpp,
	  server/Admin.h, server/Connection.cpp, server/Player.cpp,
	  server/Player.h, server/ServerRouting.cpp,
	  server/ServerRouting.h: Properlly separate username and id from
	  account, and use the database code to assign numerical ids to
	  account objects.  Eliminate extraneous member variables in account.

	* server/CommClient.cpp, server/CommServer.cpp,
	  server/CommServer.h, server/server.cpp:
	  Eliminate storing server name string twice.
2003-01-02 08:52:56 +00:00
Al Riddoch
8915b80e5d 2002-12-23 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.h, common/BaseWorld.cpp, common/BaseWorld.h,
	  common/OOGThing.h, rulesets/Area.cpp, rulesets/Area.h,
	  rulesets/BaseMind.cpp, rulesets/Character.cpp,
	  rulesets/Character.h, rulesets/Creator.cpp, rulesets/Creator.h,
	  rulesets/Entity.cpp, rulesets/Entity.h, rulesets/Food.cpp,
	  rulesets/Food.h, rulesets/Line.cpp, rulesets/Line.h,
	  rulesets/MemMap.cpp, rulesets/Plant.cpp, rulesets/Plant.h,
	  rulesets/Stackable.cpp, rulesets/Stackable.h,
	  rulesets/Structure.h, rulesets/Thing.cpp, rulesets/Thing.h,
	  rulesets/World.cpp, rulesets/World.h, server/Account.cpp,
	  server/CommClient.cpp, server/CommClient.h,
	  server/Connection.cpp, server/Connection.h,
	  server/EntityFactory.cpp, server/Lobby.cpp, server/Lobby.h,
	  server/PersistantThingFactory.h,
	  server/PersistantThingFactory_impl.h,
	  server/Restorer.cpp, server/Restorer_impl.h, server/ServerRouting.cpp,
	  server/WorldRouter.cpp: Assign ID at entity construction time,
	  and make it constant, and thus unmodifiable.
2002-12-23 23:22:25 +00:00
Al Riddoch
e6cc18bb2d 2002-12-06 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Remove redundant includes

	* tools/cycmd.cpp: Re-factor code to work non-blocking, allow
	  non-admin logins, and generally be more useful.
2002-12-06 10:53:57 +00:00
Al Riddoch
8fb2c4e31e 2002-11-04 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Reject account creation or login with zero
	  length username.
2002-11-05 01:16:53 +00:00
Al Riddoch
94fc4b418e 2002-11-01 Al Riddoch <alriddoch@zepler.org>
* tools/cycmd.cpp, server/Admin.cpp: Clean up admin interface so its
	  a bit more Atlas compliant.

	* server/Connection.cpp, server/Player.cpp: Improve some checking.

	* server/EntityFactory.cpp: Remove dead commented out code.
2002-11-01 12:12:01 +00:00
Al Riddoch
3593e73d0b 2002-10-26 Al Riddoch <alriddoch@zepler.org>
* client/CreatorClient.cpp, rulesets/BaseMind.cpp,
	  rulesets/Character.cpp, rulesets/Food.cpp,
	  rulesets/Thing.cpp, server/Connection.cpp:
	  Tighten up some atlas type checks, to reduce the chances of
	  bugs caused by malicious or buggy clients.
2002-10-26 21:28:09 +00:00
Al Riddoch
0a56c302fd 2002-10-10 Al Riddoch <alriddoch@zepler.org>
* init script fixes.

	* common/system.cpp: Ensure that parent of daemon exit status indicates
	  whether the daemon has started properlly.

	* server/Connection.cpp: Clarify error reporting.
2002-10-10 10:42:10 +00:00
Al Riddoch
1a9ba9fce1 2002-10-07 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Fix up handling of imaginary ops.

	* server/Connection.cpp: Clarify error reporting.

	* rpm spec fixes.
2002-10-07 22:24:17 +00:00
Al Riddoch
b89504d49c 2002-08-30 Al Riddoch <alriddoch@zepler.org>
* 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.
2002-08-30 13:48:39 +00:00
Al Riddoch
2bc34e92ed 2002-08-11 Al Riddoch <alriddoch@zepler.org>
* Added pkgconfig and sigc++ autotools macros into acinclude.m4
	  as only one or the other should be required, not both.

	* server/Connection.h, server/Connection.cpp: Move large methods
	  into .cpp file to avoid bloat. Add in non ref method
	  for removing deleted objects, as references are a problem.

	* Account.h, Account.cpp: characterDestroyed method now
	  takes value rather than reference because of sigc++. Add
	  necessary headers.
2002-08-11 20:27:45 +00:00
Al Riddoch
cb56caee37 2002-07-28 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp, server/Connection.cpp: Get rid of
	  character existance check on login, as dead ones are now handled
	  using SigC signals.

	* rulesets/Entity.h, rulesets/Entity.cpp, rulesets/Py_World.cpp:
	  Remove pointless deleted flag, as the only time its true is when
	  the object has been deleted, and accessing would cause a segfault.
2002-07-28 16:26:52 +00:00
Al Riddoch
00199f8aa6 2002-07-27 Al Riddoch <alriddoch@zepler.org>
* 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.
2002-07-28 13:34:58 +00:00
Al Riddoch
4c39bc2ecd 2002-07-25 Al Riddoch <alriddoch@zepler.org>
* tools/cycmd.cpp, client/CommClient.h, client/CommClient.cpp: Fixed
	  up client code so it does not rely on username being the same as
	  account id.

	* tools/cycmd.cpp: Added look and logout commands to administrate
	  users logged in.

	* server/server.cpp: Fixed metaserver code so it only sends
	  termination packet if metaserver functionality is enabled.

	* server/Connection.h, server/Connection.cpp, server/CommServer.cpp,
	  server/CommClient.h, server/Account.cpp: Fix logouts so they
	  do cause the client connection to be closed.

	* Finished switch from Fire operation to Burn.
2002-07-26 16:47:39 +00:00
Al Riddoch
56ef2d5bc0 2002-07-23 Al Riddoch <alriddoch@zepler.org>
* common/const.cpp, common/const.h: Make consts modifiable in
	  the debug build.

	* common/op_switch.h, rulesets/Character.cpp, rulesets/Character.h:
	  Fix missing logout op in op switchers.

	* server/Account.cpp, server/Connection.cpp: Handle logouts
	  a bit differently, and return the info response process
	  expects.

	* server/CommClient.cpp: Set connection id to client ip and port.

	* server/CommServer.cpp: Tighten up the way eof is handled.

	* server/ServerRouting.cpp: Set lobby id.
2002-07-23 18:43:39 +00:00
Al Riddoch
b78ae22244 2002-07-21 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Clarified errors on malformed logins.
2002-07-21 22:25:09 +00:00
Al Riddoch
07a7543461 2002-07-14 Al Riddoch <alriddoch@zepler.org>
* 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.
2002-07-14 21:04:50 +00:00
Al Riddoch
64ccf200c7 2002-07-10 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Spelling errors.

	* configure.in: Remove unused cruft.
2002-07-10 16:31:26 +00:00
Al Riddoch
3eccd4b4ab 2002-06-26 Al Riddoch <alriddoch@zepler.org>
* common/Database.h: Remove stray code.

	* common/globals.cpp: Fix incorrect usage of share dir.

	* server/Account.cpp, server/CommClient.cpp, server/CommClient.h,
	  server/CommServer.cpp, server/Connection.cpp, server/Connection.h,
	  server/Connection_methods.h, server/ExternalMind.cpp,
	  server/Lobby.cpp: Use reference instead of pointer in send
	  methods.

	* server/CommClient.h, server/CommClient.cpp: Adding missing handling
	  for Logout.
2002-06-26 00:58:22 +00:00
Al Riddoch
aa47340d59 2002-05-18 Al Riddoch <alriddoch@zepler.org>
* 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.
2002-05-18 18:09:14 +00:00
Al Riddoch
87ba7a91a7 2002-05-16 Al Riddoch <alriddoch@zepler.org>
* client/CommClient.cpp, client/ClientConnection.cpp, tools/cycmd.cpp:
	  Ensure clients use username in login ops.

	* common/BaseEntity.cpp, common/op_switch.h, rulesets/BaseMind.cpp:
	  Modify the way op switchers work so they can be used for functions
	  that return any type.

	* rulesets/Character.cpp, rulesets/Character.h: Re-write world2mind
	  layer so that rather than copying ops that are to be sent to
	  the mind, the w2m functions returning a flag indicating whether
	  the op should be passed to the mind. Made w2m and mind op handlers
	  final, as they are never overridden.

	* rulesets/Creator.cpp: Correct comments.

	* rulesets/MemMap.cpp: Add comments clarifying behavoir, and remove
	  old pseudo-code.

	* server/Account.cpp, server/Account.h: Ensure that an accounts
	  character dictionary only ever contains characters. Other entities
	  that the account chooses to create will no be stored here. Add
	  function to be called at login time to make sure that characters
	  stored here are still around.

	* server/Connection.cpp, server/Connection.h, server/ExternalMind.cpp,
	  server/ExternalMind.h: When external mind of a character is
	  destroyed, ensure that the character is removed from the
	  connection's object reference store.
2002-05-16 20:53:55 +00:00
Al Riddoch
49c0278508 2002-05-14 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp, server/Connection.cpp: Switched to using
	  USERNAME of accounts rather that ID for login and account creation.
	  Toughened up the connection code, so invalid login/create ops
	  are handled.

	* server/Connection.h: Removed unused getObject method.

	* rulesets/Character.cpp, rulesets/Character.h: Get rid of
	  inefficiency handling ops from internal and external mind. Fix
	  leak of some ops.

	* common/BaseWorld.h, server/WorldRouter.cpp, server/WorldRouter.h:
	  Add method for getting a new serialno.

	* rulesets/Thing.cpp, rulesets/Thing.h, server/WorldRouter.cpp:
	  Set refno on ops as they come back from entities. Set serialnos
	  on same ops at the same time, but do not set serialnos
	  on ops that come in from elsewhere, as those are now handled at
	  source.

	* rulesets/Creator.cpp, rulesets/Character.cpp:
	  Ensure that ops from external client preserve their serialno,
	  and assign new serialnos to other ops created at the same time.
2002-05-14 19:17:52 +00:00
Al Riddoch
5b0d6b5467 2002-05-13 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Fix slight inefficiency in processing ops.

	* server/Account.cpp: Make sure accounts have names.
2002-05-13 00:17:12 +00:00
Al Riddoch
137c41748a 2002-04-25 Al Riddoch <alriddoch@zepler.org>
* server/Connection.cpp: Correctly handle connections on account
	  object, so multiple logins on same account does not result in
	  corruption or crashes.
2002-04-28 16:49:43 +00:00
Al Riddoch
4175d14506 2002-03-11 Al Riddoch <alriddoch@zepler.org>
* tools/cycmd.cpp, server/Lobby.cpp, server/Connection.cpp,
	  rulesets/Character.cpp, client/client.cpp,
	  client/ObserverClient.cpp: ISO C++ compliance fixes.
2002-03-11 22:52:03 +00:00
Al Riddoch
83c53f06c6 2002-03-11 Al Riddoch <alriddoch@zepler.org>
* server/WorldRouter.cpp: Eliminate unnecessary call to opEnumerate()
	  and enhance debugging output.

	* server/Player.cpp: Correct the use of string.compare() in older
	  versions of libstdc++.

	* common/types.h: Added enumeration for other operations, not
	  handled by the core, but considered valid. Added new type
	  for storing mapping between operation parents and their
	  enumerated type.

	* common/op_switch.h: Separate handling of operations known to
	  be invalid from operations which are valid, but not explicitly
	  added to the core.

	* common/inheritance.h, common/inheritance.cpp, common/custom.cpp:
	  Provide global operation mapping where enumeration of operations
	  can be looked up. Install all types handled by the core, and
	  types known to be used in scripts.

	* common/BaseEntity.h, common/BaseEntity.cpp: Add object specific
	  operation mapping where operation types each object is subscribed
	  to can be enumerated, and others are rejected. Add mechanism
	  so that objects can add to the mapping, this subscribing to
	  operations. This makes enumerating operations much cheaper, and
	  eliminates the overhead of handling ops an object has no interest
	  in.

	* rulesets/Thing.h, rulesets/Thing.cpp: Add mechanism so scripts
	  can subscribe to operations.

	* rulesets/Character.h, rulesets/Character.cpp:
	  Add subscription mechanism for ops going to and from
	  the mind.

	* rulesets/BaseMind.h, rulesets/BaseMind.cpp:
	  Add subscription mechanism for sight and sound perception
	  operations sub operations, and provide an interface to it
	  for scripts.

	* server/Connection.cpp, server/Admin.cpp, server/Account.cpp,
	  rulesets/World.cpp, rulesets/World.h, rulesets/Thing.cpp,
	  rulesets/Stackable.cpp, rulesets/Plant.cpp, rulesets/Food.cpp,
	  rulesets/Character.cpp, rulesets/BaseMind.cpp:
	  Add subscriptions to operations for all core base classes.

	* rulesets/Python_API.cpp: When script is created, go through
	  methods, and subscribe to the operations which are handled by
	  them.

	* rulesets/Character.cpp: When calculating orientation of a walking
	  character, assume it is standing upright.

	* physics/Vector3D.h: Add versions of mag() and distance() which
	  omit the square root calculations, so that when their values
	  are only used for comparison, the expensive square root
	  calculations can be ommited. Add new version of collision
	  and range checking functions which provide the optimal
	  interface to the application. Add versions of methods which
	  modify this rather than creating a new operation to eliminate
	  wasted copies.

	* physics/Quaternion.cpp: Make use of faster interface provided
	  by Vector3D.

	* physics/BBox.h: Add new version of collision checking function
	  which provides optimal interface to the application.

	* modules/Location.h, modules/Location.cpp: Add new functions
	  to optimally calculate the distance between any two entities.

	* modules/Location.h: Re-write collision and range functions to
	  make much more optimal use of Vector3D, BBox and distance
	  functionality.

	* rulesets/Py_Vector3D.cpp, rulesets/Pedestrian.cpp,
	  rulesets/Movement.cpp, rulesets/Entity.cpp, rulesets/Character.cpp:
	  Eliminate implicit copies from vector arithmetic.

	* rulesets/Pedestrian.cpp, rulesets/MemMap.cpp, common/const.h:
	  Re-write code which uses magnitude of vectors to use the square
	  of the magnitude instead, as it is much cheaper to calculate.
2002-03-11 18:24:19 +00:00
Al Riddoch
7f9cf3a053 2002-03-08 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.cpp, common/BaseEntity.h, rulesets/Entity.h,
	  server/Connection.cpp: Remove destroy from the base class, and
	  make it non-virtual, as it is not used this way.

	* rulesets/Entity.cpp: Clean up destroy, ensuring that contains
	  is managed correctly.

	* server/WorldRouter.cpp: Eliminate duplicate contains management.
2002-03-08 22:52:18 +00:00
Al Riddoch
7d2e36d685 2002-03-08 Al Riddoch <alriddoch@zepler.org>
* server/Persistance.cpp, server/Connection.cpp, server/Admin.cpp,
	  server/Account.cpp, rulesets/Thing.h, rulesets/Thing.cpp,
	  rulesets/Stackable.cpp, rulesets/Py_Location.cpp,
	  rulesets/Entity.h, rulesets/Entity.cpp, rulesets/Creator.cpp,
	  rulesets/Character.cpp, common/BaseEntity.h, common/BaseEntity.cpp:
	  Get rid of flags used to determine object type, and get rid
	  of use of C style casts to cast between object pointers.
	  Replace both with dynamic casts. Clean up some stray casts
	  left behind from older versions of object structure.

	* physics/Vector3D.cpp: Added note explaining when to use
	  Vector3D::relMag() instead of mag().
2002-03-08 21:48:07 +00:00
Al Riddoch
49691213c9 2002-03-08 Al Riddoch <alriddoch@zepler.org>
* Changed typedef names to ones which make more sense, and are
	  clearer. There is no change in functionality in this commit.
2002-03-08 14:58:40 +00:00
Al Riddoch
8cc2e82387 2002-03-06 Al Riddoch <alriddoch@zepler.org>
* rulesets/Line.h, rulesets/Line.cpp, rulesets/Area.h,
	  rulesets/Area.cpp, server/EntityFactory.cpp: Added stub
	  base classes for new geometric entities.

	* server/ServerRouting.cpp, server/Lobby.h, server/Lobby.cpp,
	  server/Connection.cpp: Fleshed out lobby functionality,
	  so that accounts/connections are no longer responsible
	  for managing their own appearance and disappearance.

	* server/Account.cpp: Send info of logout.
2002-03-06 14:07:05 +00:00
Al Riddoch
ec3e9fe029 2002-03-06 Al Riddoch <alriddoch@zepler.org>
* tools/cycmd.cpp, server/WorldRouter.cpp, server/EntityFactory.cpp,
	  server/Connection.cpp, server/Admin.cpp, server/Account.cpp,
	  rulesets/World.cpp, rulesets/Thing.cpp, rulesets/Py_Operation.cpp,
	  rulesets/MemMap_methods.h, rulesets/MemMap.cpp, rulesets/Entity.cpp,
	  rulesets/Character.cpp, rulesets/BaseMind.cpp:
	  Use empty() instead of size() == 0 for STL sequence types.

	* rulesets/ThingFactory.h, server/EntityFactory.cpp: Modified the
	  way adding classes to the inheritance tree is handled, so types
	  no longer have to inherit directly from a C++ class.

	* server/WorldRouter.cpp: Modified the way broadcast operations are
	  handled to make them more efficient, and catch NULL pointers in
	  the world dictionary.
2002-03-06 00:23:28 +00:00
Al Riddoch
cb99bb996f 2002-03-03 Al Riddoch <alriddoch@zepler.org>
* client/CreatorClient.cpp: Fix operation semantics for admin
	  puppetting to new convention.

	* common/Database.cpp: Add optional support for database password.

	* physics/Quaternion.h: Add extra way of setting up a Quaternion.

	* rulesets/MindFactory.cpp, server/Connection.cpp:
	  Move some output into debugging.

	* rulesets/Python_API.cpp, rulesets/Py_Quaternion.h,
	  rulesets/Py_Quaternion.h: Add support for quaternions into the
	  scripting API.

	* rulesets/mason/define_world.py: Switch to using quaternions to
	  send orientation data to the server.
2002-03-03 00:48:28 +00:00
Al Riddoch
f7b9471b2c 2002-01-14 Al Riddoch <alriddoch@zepler.org>
* C++ compliance fixes for gcc 3.
2002-01-14 19:10:16 +00:00
Al Riddoch
c104a0a1ce * server/Connection.cpp: Toughened up Logout handling, and made
type info Get handling more robust.

	* server/Admin.cpp, server/Admin.h: Added capability for admin to
	  forcefully logout users.

	* server/Account.cpp: Made handling of OOG Look ops more inline with
	  Atlas conventions, made args handling more robust.

Al Riddoch  <alriddoch@zepler.org>
2001-11-26 12:12:55 +00:00