Mefedroniy color support
This commit is contained in:
parent
f03666bead
commit
933af5c5e0
@ -10,12 +10,8 @@ public class ClientUtil {
|
|||||||
public static final ClientColor[] colors = {
|
public static final ClientColor[] colors = {
|
||||||
new ClientColor( COLOR_KEY + "(<.*?>)", "\033[0;31m$1\033[0m"),
|
new ClientColor( COLOR_KEY + "(<.*?>)", "\033[0;31m$1\033[0m"),
|
||||||
new ClientColor("\uB9AC\u3E70(<.*?>)", "\033[0;32m$1\033[0m"),
|
new ClientColor("\uB9AC\u3E70(<.*?>)", "\033[0;32m$1\033[0m"),
|
||||||
new ClientColor(" (<.*?>)", " \033[0;34m$1\033[0m")
|
new ClientColor(" (<.*?>)", " \033[0;34m$1\033[0m"),
|
||||||
/*
|
new ClientColor("\u00B0\u0298(<.*?>)", "\033[0;35m$1\033[0m")
|
||||||
I'm too lazy to add a message parser, which is absolutely required for Mefedroniy color support. For now, it will be just white.
|
|
||||||
Also, there is another problem with that - there is no "server log format" in the protocol specification,
|
|
||||||
and I want my client to be as compatible as possible.
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public static String clientColors(String s) {
|
public static String clientColors(String s) {
|
||||||
|
@ -158,4 +158,4 @@ public class CrabClient implements Crab {
|
|||||||
System.out.print("\033[999999S\033[H\033[2J");
|
System.out.print("\033[999999S\033[H\033[2J");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -69,8 +69,9 @@ public class ServerThread implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void sendLogs(byte PID) throws IOException {
|
private void sendLogs(byte PID) throws IOException {
|
||||||
if (PID == COMMUNICATION) respond(server.cache.content());
|
if (PID == COMMUNICATION) {
|
||||||
if (PID == LOGS) {
|
respond(server.cache.content());
|
||||||
|
} else if (PID == LOGS) {
|
||||||
String clientSize = Util.readAsciiNumber(in);
|
String clientSize = Util.readAsciiNumber(in);
|
||||||
int clientSizeNum = Integer.parseInt(clientSize);
|
int clientSizeNum = Integer.parseInt(clientSize);
|
||||||
byte[] serverLogs = server.cache.content().getBytes(StandardCharsets.UTF_8);
|
byte[] serverLogs = server.cache.content().getBytes(StandardCharsets.UTF_8);
|
||||||
|
Loading…
Reference in New Issue
Block a user