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:
Andrzej Kapolka
2011-07-01 02:18:27 +00:00
parent de6d2aac57
commit 0505a7508e
@@ -758,7 +758,7 @@ public class ChatDirector extends BasicDirector
// if there was an originating speaker, see if we want to hear it
if (speaker != null) {
if ((msg.message = filter(msg.message, speaker, false)) == null) {
if (shouldFilter(msg) && (msg.message = filter(msg.message, speaker, false)) == null) {
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.
*/