improve color stripping
This commit is contained in:
parent
8115bada4f
commit
ac9066225d
|
@ -8,6 +8,7 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent
|
|||
import cpw.mods.fml.common.event.FMLServerStartingEvent
|
||||
import cpw.mods.fml.common.event.FMLServerStoppingEvent
|
||||
import matterlink.bridge.command.IBridgeCommand
|
||||
import matterlink.command.AuthCommand
|
||||
import matterlink.command.MatterLinkCommand
|
||||
import matterlink.command.MatterLinkCommandSender
|
||||
import matterlink.config.BaseConfig
|
||||
|
@ -50,6 +51,7 @@ class MatterLink : IMatterLink() {
|
|||
fun serverStarting(event: FMLServerStartingEvent) {
|
||||
logger.debug("Registering server commands")
|
||||
event.registerServerCommand(MatterLinkCommand())
|
||||
event.registerServerCommand(AuthCommand())
|
||||
start()
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ fun String.lazyFormat(env: Map<String, () -> String?>): String {
|
|||
val String.stripColorOut: String
|
||||
get() =
|
||||
if (cfg.outgoing.stripColors)
|
||||
this.replace("§.?".toRegex(RegexOption.UNIX_LINES), "")
|
||||
this.replace("[&§][0-9A-FK-OR]".toRegex(RegexOption.IGNORE_CASE), "")
|
||||
else
|
||||
this
|
||||
|
||||
|
|
Loading…
Reference in New Issue