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:
@@ -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;
|
package com.threerings.crowd.chat.server;
|
||||||
|
|
||||||
@@ -103,8 +103,10 @@ public class ChatProvider
|
|||||||
Iterator iter = CrowdServer.plreg.enumeratePlaces();
|
Iterator iter = CrowdServer.plreg.enumeratePlaces();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
PlaceObject plobj = (PlaceObject)iter.next();
|
PlaceObject plobj = (PlaceObject)iter.next();
|
||||||
SpeakProvider.sendSpeak(plobj, body.username, null,
|
if (plobj.shouldBroadcast()) {
|
||||||
message, BROADCAST_MODE);
|
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;
|
package com.threerings.crowd.data;
|
||||||
|
|
||||||
@@ -37,6 +37,15 @@ public class PlaceObject extends DObject
|
|||||||
/** Used to generate speak requests on this place object. */
|
/** Used to generate speak requests on this place object. */
|
||||||
public SpeakMarshaller speakService;
|
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.
|
* 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;
|
package com.threerings.crowd.data;
|
||||||
|
|
||||||
@@ -46,6 +46,15 @@ public class PlaceObject extends DObject
|
|||||||
/** Used to generate speak requests on this place object. */
|
/** Used to generate speak requests on this place object. */
|
||||||
public SpeakMarshaller speakService;
|
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.
|
* Looks up a user's occupant info by name.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user