Ask the place object if it needs to be broadcasted on before doing so.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2683 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2003-06-25 17:17:41 +00:00
parent 205a25ce10
commit ec6cf00d6f
3 changed files with 25 additions and 5 deletions
@@ -1,5 +1,5 @@
//
// $Id: ChatProvider.java,v 1.20 2003/06/14 00:55:19 mdb Exp $
// $Id: ChatProvider.java,v 1.21 2003/06/25 17:17:41 ray Exp $
package com.threerings.crowd.chat.server;
@@ -103,8 +103,10 @@ public class ChatProvider
Iterator iter = CrowdServer.plreg.enumeratePlaces();
while (iter.hasNext()) {
PlaceObject plobj = (PlaceObject)iter.next();
SpeakProvider.sendSpeak(plobj, body.username, null,
message, BROADCAST_MODE);
if (plobj.shouldBroadcast()) {
SpeakProvider.sendSpeak(plobj, body.username, null,
message, BROADCAST_MODE);
}
}
}
@@ -1,5 +1,5 @@
//
// $Id: PlaceObject.dobj,v 1.14 2003/06/14 00:55:40 mdb Exp $
// $Id: PlaceObject.dobj,v 1.15 2003/06/25 17:17:41 ray Exp $
package com.threerings.crowd.data;
@@ -37,6 +37,15 @@ public class PlaceObject extends DObject
/** Used to generate speak requests on this place object. */
public SpeakMarshaller speakService;
/**
* Used to indicate whether broadcast chat messages should be dispatched
* on this place object.
*/
public boolean shouldBroadcast ()
{
return true;
}
/**
* Looks up a user's occupant info by name.
*
@@ -1,5 +1,5 @@
//
// $Id: PlaceObject.java,v 1.13 2003/06/14 00:55:40 mdb Exp $
// $Id: PlaceObject.java,v 1.14 2003/06/25 17:17:41 ray Exp $
package com.threerings.crowd.data;
@@ -46,6 +46,15 @@ public class PlaceObject extends DObject
/** Used to generate speak requests on this place object. */
public SpeakMarshaller speakService;
/**
* Used to indicate whether broadcast chat messages should be dispatched
* on this place object.
*/
public boolean shouldBroadcast ()
{
return true;
}
/**
* Looks up a user's occupant info by name.
*