diff --git a/src/as/com/threerings/crowd/chat/client/ChatDirector.as b/src/as/com/threerings/crowd/chat/client/ChatDirector.as index 6c91dbf38..abbdb9677 100644 --- a/src/as/com/threerings/crowd/chat/client/ChatDirector.as +++ b/src/as/com/threerings/crowd/chat/client/ChatDirector.as @@ -751,7 +751,7 @@ public class ChatDirector extends BasicDirector return text; // check to make sure there aren't too many caps - } else if (tlen > 7) { + } else if (tlen > 7 && suppressTooManyCaps()) { // count caps var caps :int = 0; for (var ii :int = 0; ii < tlen; ii++) { @@ -826,6 +826,14 @@ public class ChatDirector extends BasicDirector return text; } + /** + * Return true if we should lowercase messages containing more than half upper-case characters. + */ + protected function suppressTooManyCaps () :Boolean + { + return true; + } + /** * Check that after mogrification the message is not too long. * @return an error mesage if it is too long, or null. diff --git a/src/java/com/threerings/crowd/chat/client/ChatDirector.java b/src/java/com/threerings/crowd/chat/client/ChatDirector.java index c9eae79d8..5597c10c7 100644 --- a/src/java/com/threerings/crowd/chat/client/ChatDirector.java +++ b/src/java/com/threerings/crowd/chat/client/ChatDirector.java @@ -814,7 +814,7 @@ public class ChatDirector extends BasicDirector return text; // check to make sure there aren't too many caps - } else if (tlen > 7) { + } else if (tlen > 7 && suppressTooManyCaps()) { // count caps int caps = 0; for (int ii=0; ii < tlen; ii++) { @@ -898,6 +898,14 @@ public class ChatDirector extends BasicDirector return buf; } + /** + * Return true if we should lowercase messages containing more than half upper-case characters. + */ + protected boolean suppressTooManyCaps () + { + return true; + } + /** * Check that after mogrification the message is not too long. * @return an error message if it is too long, or null.