2020-12-21 22:29:15 +00:00
|
|
|
|
package com.discord.utilities.textprocessing;
|
|
|
|
|
|
|
|
|
|
import com.PatchConfig;
|
|
|
|
|
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
|
|
|
|
import lanchon.dexpatcher.annotation.DexAdd;
|
|
|
|
|
import lanchon.dexpatcher.annotation.DexEdit;
|
2020-12-25 23:51:17 +00:00
|
|
|
|
import lanchon.dexpatcher.annotation.DexIgnore;
|
2020-12-21 22:29:15 +00:00
|
|
|
|
|
2021-01-01 21:23:37 +00:00
|
|
|
|
@DexEdit
|
|
|
|
|
public final class Rules {
|
2020-12-21 22:29:15 +00:00
|
|
|
|
|
|
|
|
|
// pseudonitro-viewer patch
|
|
|
|
|
|
|
|
|
|
@DexEdit
|
|
|
|
|
private static Pattern PATTERN_CUSTOM_EMOJI = ctc_getCustomEmojiPattern();
|
|
|
|
|
|
|
|
|
|
@DexAdd
|
|
|
|
|
private static Pattern ctc_getCustomEmojiPattern() {
|
|
|
|
|
if (!PatchConfig.PSEUDONITRO_VIEWER_ENABLED) {
|
|
|
|
|
// Patch not enabled
|
2021-01-01 21:23:37 +00:00
|
|
|
|
return Pattern.compile("^<(a)?:([a-zA-Z_0-9]+):(\\d+)>");
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-01-01 21:23:37 +00:00
|
|
|
|
return Pattern.compile("^<&??(a)?:([a-zA-Z_0-9]+):(\\d+)>");
|
2020-12-21 22:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|