diff --git a/1.12.2/src/main/kotlin/matterlink/command/MatterLinkCommandSender.kt b/1.12.2/src/main/kotlin/matterlink/command/MatterLinkCommandSender.kt index 0827f83..36d933c 100644 --- a/1.12.2/src/main/kotlin/matterlink/command/MatterLinkCommandSender.kt +++ b/1.12.2/src/main/kotlin/matterlink/command/MatterLinkCommandSender.kt @@ -1,9 +1,6 @@ package matterlink.command -import matterlink.bridge.ApiMessage -import matterlink.bridge.MessageHandler import matterlink.bridge.command.IMinecraftCommandSender -import matterlink.config.cfg import net.minecraft.command.ICommandSender import net.minecraft.server.MinecraftServer import net.minecraft.util.text.ITextComponent diff --git a/core/src/main/kotlin/matterlink/bridge/command/CustomCommand.kt b/core/src/main/kotlin/matterlink/bridge/command/CustomCommand.kt index 1b13ecd..bbc9b5b 100644 --- a/core/src/main/kotlin/matterlink/bridge/command/CustomCommand.kt +++ b/core/src/main/kotlin/matterlink/bridge/command/CustomCommand.kt @@ -29,7 +29,7 @@ data class CustomCommand( commandSender.execute("$execute $args") || commandSender.reply.isNotBlank() } CommandType.RESPONSE -> { - MessageHandler.transmit(ApiMessage(text = response.lazyFormat(getReplacements(user, args)))) + MessageHandler.transmit(ApiMessage(text = response.lazyFormat(getReplacements(user, userId, server, args)))) true } } @@ -48,9 +48,11 @@ data class CustomCommand( return true } - fun getReplacements(user: String, args: String): Map String> = mapOf( + fun getReplacements(user: String, userId: String, server: String, args: String): Map String> = mapOf( "{uptime}" to instance::getUptimeAsString, - "{users}" to { user }, + "{user}" to { user }, + "{userid}" to { userId }, + "{server}" to { server }, "{args}" to { args } ) } diff --git a/matterbridge-sample.toml b/matterbridge-sample.toml index 83d2153..5c5d4e2 100644 --- a/matterbridge-sample.toml +++ b/matterbridge-sample.toml @@ -132,7 +132,7 @@ RemoteNickFormat="[{PROTOCOL}.{BRIDGE}] <{NOPINGNICK}> " #Enable to show users joins/parts from other bridges #Currently works for messages from the following bridges: irc, mattermost, slack #OPTIONAL (default false) -ShowJoinPart=false +ShowJoinPart=true #StripNick only allows alphanumerical nicks. See https://github.com/42wim/matterbridge/issues/285 #It will strip other characters from the nick @@ -244,5 +244,5 @@ enable=true channel="api" [[gateway.inout]] - account="irc.freenode" + account="irc.esper" channel="#matterlink" \ No newline at end of file