Provide a method to control whether we want to filter each incoming message.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6672 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -758,7 +758,7 @@ public class ChatDirector extends BasicDirector
|
|||||||
|
|
||||||
// if there was an originating speaker, see if we want to hear it
|
// if there was an originating speaker, see if we want to hear it
|
||||||
if (speaker != null) {
|
if (speaker != null) {
|
||||||
if ((msg.message = filter(msg.message, speaker, false)) == null) {
|
if (shouldFilter(msg) && (msg.message = filter(msg.message, speaker, false)) == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -786,6 +786,14 @@ public class ChatDirector extends BasicDirector
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether we should filter the supplied incoming message.
|
||||||
|
*/
|
||||||
|
protected boolean shouldFilter (ChatMessage msg)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispatch a message to chat displays once it is fully prepared with the clientinfo.
|
* Dispatch a message to chat displays once it is fully prepared with the clientinfo.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user