Xujiayao / Discord-MC-Chat

Discord-MC-Chat (DMCC), formerly known as MC-Discord-Chat and MCDiscordChat (MCDC), is a practical and powerful Fabric and Quilt Minecraft <> Discord chat bridge inspired by BRForgers/DisFabric
https://blog.xujiayao.com/posts/4ba0a17a/
MIT License
65 stars 36 forks source link

[Bug] broadcastPlayerCommandExecution and broadcastSlashCommandExecution not applying when set to false #219

Closed XDMelone333 closed 9 months ago

XDMelone333 commented 9 months ago

Checks

Minecraft Version

1.20.4

Discord-MC-Chat Version

2.3.0

Description

I have disabled the options broadcastPlayerCommandExecution and broadcastSlashCommandExecution in the new config file, just as i had in the old one, but it they don't seem to have an effect. I can still exclude some commands specifically, but i need all commands to not be broadcast. The contents of the commands show up in the ingame chat, the discord chat and for some commands that usually don't even show in the console, now they also show in the console (my example is the login command from the easyauth mod).

To Reproduce

Log

[10:42:06] [main/INFO]: Loading Minecraft 1.20.4 with Fabric Loader 0.15.5
[10:42:06] [ForkJoinPool-1-worker-3/WARN]: Mod io_netty_netty-codec-haproxy uses the version 4.1.89.Final which isn't compatible with Loader's extended semantic version format (Could not parse version number component 'Final'!), SemVer is recommended for reliably evaluating dependencies and prioritizing newer version
[10:42:06] [main/INFO]: Loading 119 mods:
    - c2me 0.2.0+alpha.11.40
       |-- c2me-base 0.2.0+alpha.11.40
       |-- c2me-client-uncapvd 0.2.0+alpha.11.40
       |-- c2me-fixes-chunkio-threading-issues 0.2.0+alpha.11.40
       |-- c2me-fixes-general-threading-issues 0.2.0+alpha.11.40
       |-- c2me-fixes-worldgen-threading-issues 0.2.0+alpha.11.40
       |-- c2me-fixes-worldgen-vanilla-bugs 0.2.0+alpha.11.40
       |-- c2me-notickvd 0.2.0+alpha.11.40
       |-- c2me-opts-allocs 0.2.0+alpha.11.40
       |-- c2me-opts-chunk-access 0.2.0+alpha.11.40
       |-- c2me-opts-chunkio 0.2.0+alpha.11.40
       |-- c2me-opts-math 0.2.0+alpha.11.40
       |-- c2me-opts-scheduling 0.2.0+alpha.11.40
       |-- c2me-opts-worldgen-general 0.2.0+alpha.11.40
       |-- c2me-opts-worldgen-vanilla 0.2.0+alpha.11.40
       |-- c2me-rewrites-chunk-serializer 0.2.0+alpha.11.40
       |-- c2me-rewrites-chunkio 0.2.0+alpha.11.40
       |-- c2me-server-utils 0.2.0+alpha.11.40
       |-- c2me-threading-chunkio 0.2.0+alpha.11.40
       |-- c2me-threading-lighting 0.2.0+alpha.11.40
       |-- c2me-threading-worldgen 0.2.0+alpha.11.40
       |-- com_electronwill_night-config_core 3.6.5
       |-- com_electronwill_night-config_toml 3.6.5
       |-- com_ibm_async_asyncutil 0.1.0
       |-- net_objecthunter_exp4j 0.4.8
       \-- org_threadly_threadly 7.0
    - discord-mc-chat 2.3.0
       |-- com_fasterxml_jackson_core_jackson-annotations 2.14.1
       |-- com_fasterxml_jackson_core_jackson-core 2.14.1
       |-- com_fasterxml_jackson_core_jackson-databind 2.14.1
       |-- com_google_code_gson_gson 2.10.1
       |-- com_neovisionaries_nv-websocket-client 2.14
       |-- com_squareup_okhttp3_okhttp 4.11.0
       |-- com_squareup_okio_okio 2.10.0
       |-- discord-mc-chat-1_20_4 2.3.0
       |-- net_dv8tion_jda 5.0.0-beta.18
       |-- net_fellbaum_jemoji 1.3.3
       |-- net_sf_trove4j_trove4j 3.0.3
       |-- org_apache_commons_commons-collections4 4.4
       \-- org_slf4j_slf4j-api 2.0.9
    - do_a_barrel_roll 3.3.8+1.20.4
       |-- cicada 0.5.0+1.20.2-plus
       |-- fabric-permissions-api-v0 0.2-SNAPSHOT
       \-- mixinsquared 0.1.1
    - easyauth 3.0.20
       |-- at_favre_lib_bcrypt 0.10.2
       |-- at_favre_lib_bytes 1.6.1
       |-- com_mysql_mysql-connector-j 8.2.0
       |-- de_mkammerer_argon2-jvm 2.11
       |-- de_mkammerer_argon2-jvm-nolibs 2.11
       |-- fabric-permissions-api-v0 0.2-SNAPSHOT
       |-- net_java_dev_jna_jna 5.13.0
       |-- org_iq80_leveldb_leveldb 0.12
       |-- org_iq80_leveldb_leveldb-api 0.12
       |-- org_mongodb_bson 4.11.1
       |-- org_mongodb_mongodb-driver-core 4.11.1
       |-- org_mongodb_mongodb-driver-sync 4.11.1
       |-- placeholder-api 2.3.0+1.20.3
       \-- server_translations_api 2.2.0+1.20.3-rc1
            \-- packet_tweaker 0.5.0+1.20.2-rc1
    - easywhitelist 1.0.1
       \-- fabric-permissions-api-v0 0.2-SNAPSHOT
    - fabric-api 0.93.1+1.20.4
       |-- fabric-api-base 0.4.35+78d798af4f
       |-- fabric-api-lookup-api-v1 1.6.46+82b1bb3e4f
       |-- fabric-biome-api-v1 13.0.15+78d798af4f
       |-- fabric-block-api-v1 1.0.14+78d798af4f
       |-- fabric-block-view-api-v2 1.0.3+78d798af4f
       |-- fabric-blockrenderlayer-v1 1.1.45+78d798af4f
       |-- fabric-client-tags-api-v1 1.1.6+78d798af4f
       |-- fabric-command-api-v1 1.2.40+f71b366f4f
       |-- fabric-command-api-v2 2.2.19+78d798af4f
       |-- fabric-commands-v0 0.2.57+df3654b34f
       |-- fabric-containers-v0 0.1.83+df3654b34f
       |-- fabric-content-registries-v0 5.0.9+78d798af4f
       |-- fabric-convention-tags-v1 1.5.9+78d798af4f
       |-- fabric-crash-report-info-v1 0.2.22+78d798af4f
       |-- fabric-data-generation-api-v1 13.1.19+78d798af4f
       |-- fabric-dimensions-v1 2.1.60+78d798af4f
       |-- fabric-entity-events-v1 1.5.28+4ced05924f
       |-- fabric-events-interaction-v0 0.7.0+389931eb4f
       |-- fabric-events-lifecycle-v0 0.2.71+df3654b34f
       |-- fabric-game-rule-api-v1 1.0.45+78d798af4f
       |-- fabric-item-api-v1 2.1.34+78d798af4f
       |-- fabric-item-group-api-v1 4.0.20+78d798af4f
       |-- fabric-key-binding-api-v1 1.0.40+78d798af4f
       |-- fabric-keybindings-v0 0.2.38+df3654b34f
       |-- fabric-lifecycle-events-v1 2.2.29+78d798af4f
       |-- fabric-loot-api-v2 2.1.4+78d798af4f
       |-- fabric-message-api-v1 6.0.4+78d798af4f
       |-- fabric-mining-level-api-v1 2.1.59+78d798af4f
       |-- fabric-model-loading-api-v1 1.0.7+78d798af4f
       |-- fabric-models-v0 0.4.6+9386d8a74f
       |-- fabric-networking-api-v1 3.1.4+b7e146354f
       |-- fabric-object-builder-api-v1 13.0.8+06274a474f
       |-- fabric-particles-v1 1.1.6+78d798af4f
       |-- fabric-recipe-api-v1 2.0.17+78d798af4f
       |-- fabric-registry-sync-v0 4.0.15+78d798af4f
       |-- fabric-renderer-api-v1 3.2.3+78d798af4f
       |-- fabric-renderer-indigo 1.5.3+78d798af4f
       |-- fabric-renderer-registries-v1 3.2.50+df3654b34f
       |-- fabric-rendering-data-attachment-v1 0.3.41+73761d2e4f
       |-- fabric-rendering-fluids-v1 3.0.32+78d798af4f
       |-- fabric-rendering-v0 1.1.53+df3654b34f
       |-- fabric-rendering-v1 3.0.12+78d798af4f
       |-- fabric-resource-conditions-api-v1 2.3.13+78d798af4f
       |-- fabric-resource-loader-v0 0.11.15+78d798af4f
       |-- fabric-screen-api-v1 2.0.16+78d798af4f
       |-- fabric-screen-handler-api-v1 1.3.52+78d798af4f
       |-- fabric-sound-api-v1 1.0.16+78d798af4f
       |-- fabric-transfer-api-v1 4.0.7+e84342304f
       \-- fabric-transitive-access-wideners-v1 5.0.13+78d798af4f
    - fabric-language-kotlin 1.10.17+kotlin.1.9.22
       |-- org_jetbrains_kotlin_kotlin-reflect 1.9.22
       |-- org_jetbrains_kotlin_kotlin-stdlib 1.9.22
       |-- org_jetbrains_kotlin_kotlin-stdlib-jdk7 1.9.22
       |-- org_jetbrains_kotlin_kotlin-stdlib-jdk8 1.9.22
       |-- org_jetbrains_kotlinx_atomicfu-jvm 0.23.1
       |-- org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.7.3
       |-- org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.7.3
       |-- org_jetbrains_kotlinx_kotlinx-datetime-jvm 0.5.0
       |-- org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.6.2
       |-- org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.6.2
       \-- org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.6.2
    - fabricloader 0.15.5
       \-- mixinextras 0.3.2
    - fallingtree 1.20.4.3
    - java 17
    - lithium 0.12.1
    - minecraft 1.20.4
    - noexpensive 1.20.4-1.9.0
    - proxy_protocol_support 1.0.3-fabric
       \-- io_netty_netty-codec-haproxy 4.1.89.Final
    - skinrestorer 1.2.4+1.20.2
    - starlight 1.1.3+fabric.f5dcd1a
[10:42:07] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/usr/local/bin/server/libraries/net/fabricmc/sponge-mixin/0.12.5+mixin.0.8.5/sponge-mixin-0.12.5+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER
[10:42:07] [main/INFO]: Compatibility level set to JAVA_16
[10:42:07] [main/INFO]: Compatibility level set to JAVA_17
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.base.mixin
[10:42:07] [main/INFO]: Global Executor Parallelism: 1 configured, 1 evaluated, 1 default evaluated
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.fixes.chunkio.threading_issues.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.fixes.general.threading_issues.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.fixes.worldgen.threading_issues.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.fixes.worldgen.vanilla_bugs.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.notickvd.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.opts.allocs.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.opts.chunk_access.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.opts.chunkio.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.opts.math.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.opts.scheduling.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.opts.worldgen.general.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.opts.worldgen.vanilla.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.rewrites.chunk_serializer.mixin
[10:42:07] [main/INFO]: Disabling com.ishland.c2me.rewrites.chunk_serializer.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.rewrites.chunkio.mixin
[10:42:07] [main/INFO]: Disabling com.ishland.c2me.rewrites.chunkio.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.server.utils.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.threading.chunkio.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.threading.lighting.mixin
[10:42:07] [main/INFO]: Initializing com.ishland.c2me.threading.worldgen.mixin
[10:42:07] [main/INFO]: Disabling com.ishland.c2me.threading.worldgen.mixin
[10:42:07] [main/WARN]: Mod 'c2me' attempted to override option 'mixin.world.player_chunk_tick', which doesn't exist, ignoring
[10:42:07] [main/INFO]: Loaded configuration file for Lithium: 129 options available, 0 override(s) found
[10:42:08] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.2).
[10:42:08] [main/WARN]: Did not find udev library in operating system. Some features may not work.
[10:42:16] [main/INFO]: [EasyAuth]: EasyAuth mod by samo_lego, NikitaCartes.
[10:42:16] [main/WARN]: [EasyAuth]: Disable enforce-secure-profile to allow offline players to join the server
[10:42:16] [main/WARN]: [EasyAuth]: For more info, see https://github.com/NikitaCartes/EasyAuth/issues/68
[10:42:16] [main/INFO]: [EasyWhitelist] Whitelist is now name-based.
[10:42:16] [Cicada thread 0/INFO]: [do_a_barrel_roll] One day I'll finish the swimming version of this mod. One day.
[10:42:17] [main/INFO]: [STDOUT]: Hello NoExpensive world!
[10:42:17] [main/INFO]: -----------------------------------------
[10:42:17] [main/INFO]: Discord-MC-Chat (DMCC) 2.3.0
[10:42:17] [main/INFO]: By Xujiayao
[10:42:17] [main/INFO]: 
[10:42:17] [main/INFO]: More information + Docs:
[10:42:17] [main/INFO]: https://blog.xujiayao.com/posts/4ba0a17a/
[10:42:17] [main/INFO]: -----------------------------------------
[10:42:18] [main/INFO]: Login Successful!
[10:42:18] [JDA MainWS-WriteThread/INFO]: Connected to WebSocket
[10:42:20] [JDA MainWS-ReadThread/INFO]: Finished Loading!
[10:42:20] [Thread-3/INFO]: [ConsoleLog] Starting new ConsoleLogListener
[10:42:20] [Thread-3/INFO]: [ConsoleLog] Listening to new latest.log
[10:42:20] [main/INFO]: Proxy Protocol enabled!
[10:42:20] [main/INFO]: TCPShield integration enabled!
[10:42:20] [main/INFO]: Using 47 whitelisted IPs: [51.161.99.32/27, 51.178.108.172/30, 51.89.81.32/27, 51.222.55.28/30, 51.178.221.0/27, 51.81.4.128/29, 172.17.0.1, 51.222.92.224/27, 51.77.31.32/27, 51.38.153.44/30, 37.19.206.89, 158.69.58.208/30, 51.79.61.228/30, 54.36.236.48/30, 146.59.65.224/27, 135.148.217.96/27, 135.148.217.192/27, 149.202.13.32/27, 141.95.23.0/27, 51.222.93.0/27, 51.89.50.132/30, 104.234.6.0/24, 51.195.87.96/27, 54.38.216.200/30, 192.168.178.0/24, 146.59.66.32/27, 146.59.66.0/27, 141.95.62.224/27, 51.89.81.0/27, 51.195.52.0/27, 51.178.244.40/30, 178.33.198.192/27, 149.56.152.184/30, 51.83.245.80/30, 51.161.19.224/27, 51.161.99.64/27, 217.182.27.224/27, 51.195.87.128/27, 198.178.119.0/24, 178.32.145.164/30, 51.222.93.32/27, 51.75.85.108/30, 51.161.38.224/27, 51.161.99.0/27, 51.89.127.36/30, 5.196.219.36/30, 135.125.217.68]
[10:42:20] [main/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[10:42:22] [main/INFO]: Loaded 7 recipes
[10:42:22] [main/INFO]: Loaded 1274 advancements
[10:42:22] [ForkJoinPool.commonPool-worker-1/INFO]: Loaded 34 translation keys
[10:42:23] [main/INFO]: Applied 0 biome modifications to 0 of 64 new biomes in 1.967 ms
[10:42:23] [Server thread/INFO]: Starting minecraft server version 1.20.4
[10:42:23] [Server thread/INFO]: Loading properties
[10:42:23] [Server thread/INFO]: Default game type: SURVIVAL
[10:42:23] [Server thread/INFO]: Generating keypair
[10:42:23] [Server thread/INFO]: Starting Minecraft server on *:25565
[10:42:23] [Server thread/INFO]: Using epoll channel type
[10:42:23] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
[10:42:23] [Server thread/WARN]: The server will make no attempt to authenticate usernames. Beware.
[10:42:23] [Server thread/WARN]: While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
[10:42:23] [Server thread/WARN]: To change this, set "online-mode" to "true" in the server.properties file.
[10:42:23] [Server thread/INFO]: Preparing level "world"
[10:42:23] [Server thread/INFO]: Enforcing safe world random access
[10:42:26] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[10:42:26] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[10:42:27] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[10:42:27] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[10:42:28] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[10:42:28] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[10:42:29] [Worker-Main-3/INFO]: Preparing spawn area: 4%
[10:42:29] [Worker-Main-3/INFO]: Preparing spawn area: 7%
[10:42:30] [Worker-Main-3/INFO]: Preparing spawn area: 28%
[10:42:30] [Worker-Main-1/INFO]: Preparing spawn area: 59%
[10:42:31] [Worker-Main-2/INFO]: Preparing spawn area: 100%
[10:42:31] [Server thread/INFO]: Time elapsed: 4609 ms
[10:42:31] [Server thread/INFO]: Done (7.307s)! For help, type "help"
[10:42:31] [Server thread/WARN]: UUID of added entity already exists: class_1531['Armor Stand'/104, l='ServerLevel[world]', x=22068880.50, y=1000.00, z=-4185487.50]
[10:42:47] [Server thread/INFO]: XDMelone333[/146.70.178.108:37562] logged in with entity id 106 at (191.525516475986, 65.0, -257.3963054035401)
[10:42:47] [Server thread/INFO]: XDMelone333 joined the game
[10:42:47] [Netty Epoll Server IO #1/INFO]: [do_a_barrel_roll] Client of XDMelone333 accepted server config.
[10:42:51] [Server thread/INFO]: <XDMelone333> /l SUPER_SECRET_PASSWORD
[10:42:54] [Server thread/INFO]: XDMelone333 lost connection: Disconnected
[10:42:54] [Server thread/INFO]: XDMelone333 left the game
[10:42:59] [Server thread/INFO]: Stopping the server
[10:42:59] [Server thread/INFO]: Stopping server
[10:42:59] [Server thread/INFO]: Saving players
[10:42:59] [Server thread/INFO]: Saving worlds
[10:43:00] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
[10:43:00] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether
[10:43:00] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end
[10:43:00] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[10:43:00] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[10:43:00] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[10:43:00] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[10:43:00] [Server thread/INFO]: [EasyAuth]: Shutting down EasyAuth.
[10:43:00] [Server thread/INFO]: [EasyAuth]: Database connection closed successfully
[10:43:00] [Thread-3/INFO]: [ConsoleLog] Closing ConsoleLogListener

Config

{
  "generic": {
    "language": "en_us",
    "botToken": "NOT-FOR-YOUR-EYES",
    "botPlayingStatus": "Minecraft (%onlinePlayerCount%/%maxPlayerCount%)",
    "botListeningStatus": "",
    "useWebhook": true,
    "channelId": "11537932023530*****",
    "consoleLogChannelId": "11539613246619*****",
    "updateNotificationChannelId": "11566212720469*****",
    "useUuidInsteadOfName": false,
    "avatarApi": "https://mc-heads.net/avatar/%player%.png",
    "broadcastPlayerCommandExecution": false,
    "broadcastSlashCommandExecution": false,
    "announceServerStartStop": true,
    "announcePlayerJoinLeave": true,
    "announceDeathMessages": true,
    "announceAdvancements": true,
    "broadcastChatMessages": true,
    "formatChatMessages": true,
    "allowedMentions": [
      "everyone",
      "users",
      "roles"
    ],
    "useServerNickname": true,
    "discordNewlineLimit": 3,
    "announceHighMspt": true,
    "msptCheckInterval": 5000,
    "msptLimit": 50,
    "whitelistRequiresAdmin": true,
    "notifyUpdates": true,
    "mentionAdminsForUpdates": true,
    "updateChannelTopic": true,
    "channelTopicUpdateInterval": 600000,
    "shutdownImmediately": true,
    "excludedCommands": [
      "/msg",
      "/tell",
      "/tellraw",
      "/w"
    ],
    "adminsIds": [
      "546701210745******",
      "475814978486******",
      "940651482615******"
    ]
  },
  "multiServer": {
    "enable": false,
    "host": "127.0.0.1",
    "port": 5000,
    "name": "SMP",
    "botIds": []
  },
  "customMessage": {
    "unformattedResponseMessage": "",
    "unformattedChatMessage": "",
    "unformattedOtherMessage": "",
    "unformattedCommandNotice": "",
    "formattedResponseMessage": "",
    "formattedChatMessage": "",
    "formattedOtherMessage": "",
    "formattedCommandNotice": "",
    "messageWithoutWebhook": "",
    "messageWithoutWebhookForMultiServer": "",
    "serverStarted": "",
    "serverStopped": "",
    "joinServer": "",
    "leftServer": "",
    "deathMessage": "",
    "advancementTask": "",
    "advancementGoal": "",
    "advancementChallenge": "",
    "highMspt": "",
    "offlineChannelTopic": "",
    "onlineChannelTopic": "",
    "onlineChannelTopicForMultiServer": ""
  },
  "latestVersion": "2.3.0",
  "latestCheckTime": 1707862376604
}
Xujiayao commented 9 months ago

Oops, sorry. It was probably a mistake during the refactor. Fixing it now.

Also, you reminded me that I forgot to mention in the changelog that the config file has been renamed 😂

Xujiayao commented 9 months ago

Thanks for submitting the issue promptly. Please wait for the new release.