Pass the mode to the speaker validator.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3429 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2005-03-27 20:16:59 +00:00
parent 771842edf4
commit 5290ab7c1d
2 changed files with 5 additions and 3 deletions
@@ -63,7 +63,8 @@ public class SpeakProvider
* via the speak provider with which this validator was
* registered.
*/
public boolean isValidSpeaker (DObject speakObj, ClientObject speaker);
public boolean isValidSpeaker (DObject speakObj, ClientObject speaker,
byte mode);
}
/**
@@ -133,7 +134,7 @@ public class SpeakProvider
// have to do this validation here. Or not.
if ((mode == BROADCAST_MODE) ||
(_validator != null &&
!_validator.isValidSpeaker(_speakObj, caller))) {
!_validator.isValidSpeaker(_speakObj, caller, mode))) {
Log.warning("Refusing invalid speak request " +
"[caller=" + caller.who() +
", speakObj=" + _speakObj.which() +
@@ -602,7 +602,8 @@ public class PlaceManager
}
// documentation inherited from interface
public boolean isValidSpeaker (DObject speakObj, ClientObject speaker)
public boolean isValidSpeaker (DObject speakObj, ClientObject speaker,
byte mode)
{
// only allow people in the room to speak
return _plobj.occupants.contains(speaker.getOid());