forked from TuxCoding/FastLogin
Channel names should be lowercase according to the spec
Related #217, #218
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ import com.google.common.io.ByteArrayDataOutput;
|
||||
|
||||
public class ChangePremiumMessage implements ChannelMessage {
|
||||
|
||||
public static final String CHANGE_CHANNEL = "ChStatus";
|
||||
public static final String CHANGE_CHANNEL = "ch-status";
|
||||
|
||||
private String playerName;
|
||||
private boolean willEnable;
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import java.util.UUID;
|
||||
|
||||
public class LoginActionMessage implements ChannelMessage {
|
||||
|
||||
public static final String FORCE_CHANNEL = "ForceAct";
|
||||
public static final String FORCE_CHANNEL = "force-act";
|
||||
|
||||
private Type type;
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.github.games647.fastlogin.core.message;
|
||||
|
||||
public class NamespaceKey {
|
||||
|
||||
private final String namespace;
|
||||
private final String key;
|
||||
|
||||
private final String combined;
|
||||
|
||||
public NamespaceKey(String namespace, String key) {
|
||||
this.namespace = namespace.toLowerCase();
|
||||
this.key = key.toLowerCase();
|
||||
|
||||
this.combined = namespace + ':' + key;
|
||||
}
|
||||
|
||||
public String getCombinedName() {
|
||||
return combined;
|
||||
}
|
||||
|
||||
public static String getCombined(String namespace, String key) {
|
||||
return new NamespaceKey(namespace, key).combined;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import com.google.common.io.ByteArrayDataOutput;
|
||||
|
||||
public class SuccessMessage implements ChannelMessage {
|
||||
|
||||
public static final String SUCCESS_CHANNEL = "Success";
|
||||
public static final String SUCCESS_CHANNEL = "success";
|
||||
|
||||
@Override
|
||||
public String getChannelName() {
|
||||
|
||||
Reference in New Issue
Block a user