Commit graph

189 commits

Author SHA1 Message Date
Alistair Riddoch
e0aa034396 Remove unneeded include 2011-12-20 15:45:53 +00:00
Alistair Riddoch
48e34ce80d Remove mind correctly from avatars 2011-12-16 13:12:58 +00:00
Alistair Riddoch
2c035d0505 Use ConnectedRouter as the base for all accounts 2010-12-13 14:15:54 +00:00
Alistair Riddoch
21086ca150 Refactor Create in Accounts to have a common handler, with a new virtual detail 2010-12-06 00:02:21 +00:00
Alistair Riddoch
b87968537d Converge the create code in account classes 2010-12-05 18:47:04 +00:00
Alistair Riddoch
a311420a12 Remove obsolete check 2010-12-04 15:21:05 +00:00
Alistair Riddoch
45c817708e Remove unneeded dynamic cast. The arg doesn't need to be an entity. 2010-12-03 22:06:03 +00:00
Alistair Riddoch
6aa6599d67 Add logging of teleport related events 2010-11-30 21:38:29 +00:00
Alistair Riddoch
a615c0f80a Remove some code duplication 2010-11-26 22:36:23 +00:00
Manohar Vanga
e16e5c75a2 Added explanatory comments to server/Account.cpp 2010-08-17 11:58:21 +05:30
Manohar Vanga
eb68eac94a Look operation handler now checks only for additional attribute 2010-08-17 11:58:21 +05:30
Manohar Vanga
9318f9a4f9 Fixed removal of teleport authentication entry to include failed connectCharacter calls 2010-08-17 11:58:20 +05:30
Manohar Vanga
ed0965c13f Fixed return values to comply with standard conventions 2010-08-17 11:58:20 +05:30
Manohar Vanga
8dc6054753 Changed attribute name from "key" to "possess_key" 2010-08-17 11:58:20 +05:30
Manohar Vanga
2bd4ea418f Added to Account::LookOperation to add pending teleport characters 2010-08-17 11:58:20 +05:30
Manohar Vanga
bd12f6cb2b Added public function Account::connectCharacter() 2010-08-17 11:58:20 +05:30
Alistair Riddoch
4d68e72b95 Remove obsolete hacked in inventory. 2010-01-03 02:30:57 +00:00
Alistair Riddoch
42c8ce30d2 Remove a bunch of debug output. 2009-12-30 15:23:42 +00:00
Alistair Riddoch
53a611b198 Call the spawn code if one is specified. 2009-12-30 15:11:46 +00:00
Alistair Riddoch
4b64e0391d Add available spawn points to the Account representation. 2009-12-29 19:11:57 +00:00
Alistair Riddoch
3391530725 Add a virtual interface to Account making it responsible for its persistence. 2009-12-01 17:40:21 +00:00
Alistair Riddoch
2b9eeaacca Make username and password protected, and use accessors. 2009-11-24 13:13:54 +00:00
Alistair Riddoch
a7866c404a Ensure none of the operation handlers crash if they get called when disconnected 2009-11-18 17:49:34 +00:00
Alistair Riddoch
40bb3dc65b Add basic filtering of task data passed from client 2009-06-16 15:25:46 +01:00
Alistair Riddoch
27ea787c1f Add detection of client operations that will modify task attributes. 2009-06-16 13:43:50 +01:00
Alistair Riddoch
ffd019a744 Correct the spelling of persistence. 2009-03-24 03:08:45 +00:00
Alistair Riddoch
cd1f42c3f9 Rename Inheritance class files to match class name. 2009-03-20 15:31:38 +00:00
Al Riddoch
ab54d0fea2 2009-02-02 Al Riddoch <alriddoch@googlemail.com>
* 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.
2009-02-02 02:28:45 +00:00
Al Riddoch
9fb512e031 2008-11-30 Al Riddoch <alriddoch@googlemail.com>
* server/Account.cpp: Don't give names to items in the default
	  inventory.

	* rulesets/mason/world/objects/buildings/House3.py: Don't give
	  names to the invisible wall objects.
2008-11-30 04:58:18 +00:00
Al Riddoch
e4a641a9c3 2008-09-12 Al Riddoch <alriddoch@googlemail.com>
* server/Account.cpp: Set the mind property to empty on character
	  entities controlled by remote clients.
2008-09-12 14:02:52 +00:00
Al Riddoch
adc64c3ced 2008-01-28 Al Riddoch <alriddoch@googlemail.com>
* 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.
2008-01-28 23:48:30 +00:00
Al Riddoch
ccf8bebcb0 2008-01-26 Al Riddoch <alriddoch@googlemail.com>
* common/BaseEntity.cpp, common/BaseEntity.h: Remove the code that
	  handle ID, and just inherit from Identified.

	* client/CharacterClient.cpp, client/CreatorClient.cpp,
	  common/OOGThing.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/Structure.cpp,
	  rulesets/Thing.cpp, rulesets/World.cpp, server/Account.cpp,
	  server/Admin.cpp, server/ExternalMind.cpp, server/Lobby.cpp,
	  server/Peer.cpp, server/Player.cpp, server/ServerRouting.cpp,
	  server/SlaveClientConnection.cpp: Add calls to the virtually
	  inherited Identified constructor as required.
2008-01-26 17:43:20 +00:00
Al Riddoch
ef88f10e33 2008-01-17 Al Riddoch <alriddoch@googlemail.com>
* common/BaseEntity.cpp, common/BaseEntity.h: Remove generic operation
	  routing code.

	* common/op_switch.h: Remove all OOG operations from the standard
	  op switch.

	* rulesets/Entity.cpp, rulesets/Entity.h: Replace generic operation
	  routing with a more specific IG routing implementation.

	* rulesets/BaseMind.cpp: Add a mind specific operation router
	  implementation.

	* server/Account.cpp, server/Account.h: Remove handling of Login,
	  which should never got to Account. Add base handler for Get,
	  as it needs to be overriden in Admin.
2008-01-17 18:54:04 +00:00
Al Riddoch
b4c79181c5 2008-01-12 Al Riddoch <alriddoch@googlemail.com>
* 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.
2008-01-12 22:41:10 +00:00
Al Riddoch
41ce55e11e 2008-01-12 Al Riddoch <alriddoch@googlemail.com>
* 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.
2008-01-12 18:08:03 +00:00
Al Riddoch
bd3a9e153c 2007-11-28 Al Riddoch <alriddoch@zepler.org>
* 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.
2007-11-28 20:22:42 +00:00
Al Riddoch
e7d031876e 2007-07-29 Al Riddoch <alriddoch@zepler.org>
* 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.
2007-07-29 12:22:58 +00:00
Al Riddoch
2069f3dd4c 2007-07-29 Al Riddoch <alriddoch@zepler.org>
* 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:
2007-07-29 03:33:33 +00:00
Al Riddoch
9efdc006aa 2007-01-27 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Remove the hack that ensures players always
	  create a settler if they try and create a character that does not
	  exist. Handle setting initial attributes unique to player characters
	  here, rather than setting the defaults on the classes.

	* data/mason.xml: Remove initialising status to a ery low value to
	  make settlers and goblins starve easily.

	* data/basic.xml: Set the mass of a arrow to something sane.
2007-01-27 15:07:54 +00:00
Al Riddoch
6e5ca40d72 2007-01-17 Al Riddoch <alriddoch@zepler.org>
* 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.
2007-01-17 23:00:56 +00:00
Al Riddoch
73e636a85b 2007-01-17 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Fix the name of character inventory items.

	* server/Connection.cpp: Stop any movement when the client
	  disconnects.
2007-01-17 10:04:14 +00:00
Al Riddoch
041f41c7a8 2007-01-16 Al Riddoch <alriddoch@zepler.org>
* data/mason.xml: Adjust the bbox on the knife like a whole load.

	* server/Account.cpp: Hack some clothes into the startup inventory.
2007-01-16 17:01:40 +00:00
Al Riddoch
0f44eff410 2006-12-26 Al Riddoch <alriddoch@zepler.org>
* client/BaseClient.cpp, client/BaseClient.h,
	  client/ClientConnection.cpp, common/AtlasFileLoader.cpp,
	  common/AtlasFileLoader.h, common/BaseEntity.cpp, common/BaseEntity.h,
	  common/Property.h, common/accountbase.cpp, common/accountbase.h,
	  rulesets/ActivePropertyFactory.h,
	  rulesets/ActivePropertyFactory_impl.h, rulesets/Area.cpp,
	  rulesets/Area.h, rulesets/AreaProperty.cpp, rulesets/AreaProperty.h,
	  rulesets/BaseMind.cpp, rulesets/BaseMind.h, server/Account.cpp,
	  server/Admin.cpp, server/Admin.h, server/ArithmeticFactory.h,
	  tests/Makefile.am, tools/AdminClient.cpp, tools/AdminClient.h,
	  tools/cycmd.cpp: Add inline documentation.

	* rulesets/ActivePropertyFactory.h: Use handler function pointer
	  typedef for readability.

	* rulesets/AreaProperty.cpp, rulesets/AreaProperty.h: Fix PropertyBase
	  overriding by adding const to the right methods.
2006-12-26 14:30:42 +00:00
Al Riddoch
9a56dac06c 2006-10-26 Al Riddoch <alriddoch@zepler.org>
* Add RCS Id keywords to every file, for better version tracking.
2006-10-26 00:48:00 +00:00
Al Riddoch
484657515c 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Rename some variables to clearer meanings.
	  Only send confirmation of subscription on entity creation if
	  the entity created is a character. Otherwise it is still created,
	  and can be manipulated, but not directly controlled by the
	  client.
2006-08-07 17:58:23 +00:00
Al Riddoch
61e42dbd17 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Only add initial inventory items if the entity
	  being created is a character. Add some comments.
2006-08-07 17:47:43 +00:00
Al Riddoch
f23d374bc1 2006-08-07 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Report an error if a logout is received by
	  an account which is not connected.
2006-08-07 11:06:41 +00:00
Al Riddoch
ad7eae558d 2006-07-08 Al Riddoch <alriddoch@zepler.org>
* server/Account.cpp: Re-order checks for increased robustness.
	  Add more error reports.

	* server/CommMDNSPublisher.cpp: Remove a redundant FIXME.
2006-07-09 00:04:37 +00:00
Al Riddoch
60c62e2d86 2006-06-26 Al Riddoch <alriddoch@zepler.org>
* 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.
2006-06-26 16:49:25 +00:00
Al Riddoch
07da807b3b 2006-06-06 Al Riddoch <alriddoch@zepler.org>
* 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.
2006-06-07 00:13:39 +00:00