Allow de-capitalizing to be turned off by subclasses.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4720 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user