/f showinvites for ability to see pending invites for current faction. Adds feature in ticket #76
This commit is contained in:
@@ -114,17 +114,17 @@ public class CmdShow extends FCommand {
|
||||
enemyList = enemyList.substring(0, enemyList.length() - 2);
|
||||
}
|
||||
|
||||
if(allyList.length() > 2048) {
|
||||
if (allyList.length() > 2048) {
|
||||
String[] lines = splitString(allyList, 2048, 256000);
|
||||
for (int i=0; i < lines.length; i++) {
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
sendMessage(lines[i]);
|
||||
}
|
||||
} else {
|
||||
sendMessage(allyList);
|
||||
}
|
||||
if(enemyList.length() > 2048) {
|
||||
if (enemyList.length() > 2048) {
|
||||
String[] lines = splitString(enemyList, 2048, 256000);
|
||||
for (int i=0; i < lines.length; i++) {
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
sendMessage(lines[i]);
|
||||
}
|
||||
} else {
|
||||
@@ -166,17 +166,17 @@ public class CmdShow extends FCommand {
|
||||
offlineList = offlineList.substring(0, offlineList.length() - 2);
|
||||
}
|
||||
|
||||
if(onlineList.length() > 2048) {
|
||||
if (onlineList.length() > 2048) {
|
||||
String[] lines = splitString(onlineList, 2048, 256000);
|
||||
for (int i=0; i < lines.length; i++) {
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
sendMessage(lines[i]);
|
||||
}
|
||||
} else {
|
||||
sendMessage(onlineList);
|
||||
}
|
||||
if(offlineList.length() > 2048) {
|
||||
if (offlineList.length() > 2048) {
|
||||
String[] lines = splitString(offlineList, 2048, 256000);
|
||||
for (int i=0; i < lines.length; i++) {
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
sendMessage(lines[i]);
|
||||
}
|
||||
} else {
|
||||
@@ -186,11 +186,11 @@ public class CmdShow extends FCommand {
|
||||
|
||||
private String[] splitString(String text, int chunkSize, int maxLength) {
|
||||
char[] data = text.toCharArray();
|
||||
int len = Math.min(data.length,maxLength);
|
||||
String[] result = new String[(len+chunkSize-1)/chunkSize];
|
||||
int len = Math.min(data.length, maxLength);
|
||||
String[] result = new String[(len + chunkSize - 1) / chunkSize];
|
||||
int linha = 0;
|
||||
for (int i=0; i < len; i+=chunkSize) {
|
||||
result[linha] = new String(data, i, Math.min(chunkSize,len-i));
|
||||
for (int i = 0; i < len; i += chunkSize) {
|
||||
result[linha] = new String(data, i, Math.min(chunkSize, len - i));
|
||||
linha++;
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user