AlessioDP / Parties

Party manager plugin for your Minecraft server!
https://alessiodp.com/parties/
GNU Affero General Public License v3.0
79 stars 45 forks source link

Messages in party chat is getting picked up by DiscordSRV #241

Open GrimPlayzs opened 10 months ago

GrimPlayzs commented 10 months ago

Currently on a survival server of mine players use the party chat feature to talk privately to a group of players however, my discord bot which relays messages to a discord channel picks up these chats. I should mention I use HuskChat for handling messages with SignedVelocity.

AlessioDP commented 10 months ago

How are you using the party chat feature? Command /p or toggling with /party chat then send messages to the chat?

GrimPlayzs commented 10 months ago

We are toggling with /party chat but some players do /party chat (message)

AlessioDP commented 10 months ago

By looking at the code it should already work, can you post plugin versions? May be help the configuration of HuskChat to see how channels are configurated.

By the way, /party chat <message> is not a correct command, to send a message with a command you can only use /p <message> (configurable). Syntax of party chat toggle is /party chat [on/off>.

GrimPlayzs commented 10 months ago

I misworded it by mistake, I meant that we type in /party chat and then the message after the command is entered. I use HuskChat version 2.7.1, And Parties version 3.2.9.

AlessioDP commented 10 months ago

SignedVelocity has been mentioned so I was supposing you were using Parties in Velocity, but you said that messages are sent to Discord via DiscordSRV (issue title). Is this discord message handled by DiscordSRV or HuskChat? (If DiscordSRV, which version?)

How did you setup Parties? Velocity or Bukkit only? I need more info about the server itself because I must understand what event is not getting cancelled correctly when my plugin handles the chat message.

PS. Parties is outdated

GrimPlayzs commented 10 months ago

Ever since I updated to SignedVelocity from UnsignVelocity messages began to be relayed to DiscordSRV with HuskChat as before it didn't with UnsignVelocity. As far I can tell the discord messages are being handled by DiscordSRV, but since all the chats are being handled by HustChat (through the proxy) I am not sure how DiscordSRV is getting the messages. To answer your other question Parties is only installed on Velocity.

I am using version 1.26.2 of DiscordSRV.

AlessioDP commented 10 months ago

Did you install SignedVelocity in Bukkit servers?

GrimPlayzs commented 10 months ago

Yes all backend servers have SignedVelocity.

AlessioDP commented 10 months ago

I do not know, try to update all plugins. I tested it and if SignedVelocity is correctly installed, it works. For example, If I do not install it in sub servers, it won't work.

The message is correctly cancelled in subservers.

You may try to debug it by adding -Dio.github._4drian3d.signedvelocity.debug=true at your server startup script (after java) in subservers, then post a full server log here after you sent a message from Velocity with /party chat toggled.

GrimPlayzs commented 10 months ago

Okay, I will try that. Won't be able to do it for a few hours.

GrimPlayzs commented 10 months ago

I noticed that the messages only appears for other players not me for example when I type something in my party chat it doesn't show up in that discord channel but every other user's messages does.

AlessioDP commented 10 months ago

Are you talking about chat messages or party chat messages?

GrimPlayzs commented 10 months ago

Party chat messages.

AlessioDP commented 10 months ago

Can you post server logs with debug enabled in Parties and DiscordSRV please

GrimPlayzs commented 10 months ago

The whole server log? Or just the log about the group chat message?

AlessioDP commented 10 months ago

Before and after you send a message in party chat and its triggered in Discord (both proxy and sub server). Entire server log is not a problem, just write the timestamp too of that moment.

GrimPlayzs commented 10 months ago

I also noticed the message doesn't appear in Discord if anyone not just me does /p (message). But if you first toggle into party chat by doing "/party chat" the message will always appear in Discord.

This is the log when I do "/p (message):

[11:27:03 INFO]: [SignedVelocity] [DEBUG] [Plugin Message] Received Valid Message [11:27:03 INFO]: [SignedVelocity] [DEBUG] | Queue: COMMAND_RESULT [11:27:03 INFO]: [SignedVelocity] [DEBUG] | Result: ALLOWED [11:27:03 INFO]: [SignedVelocity] [DEBUG] | Message: null

Log when I first toggle into party chat by doing "/party chat" and then a message:

[11:28:55 INFO]: [SignedVelocity] [DEBUG] [Plugin Message] Received Valid Message [11:28:55 INFO]: [SignedVelocity] [DEBUG] | Queue: CHAT_RESULT [11:28:55 INFO]: [SignedVelocity] [DEBUG] | Result: CANCEL [11:28:55 INFO]: [SignedVelocity] [DEBUG] | Message: null [11:28:55 INFO]: [SignedVelocity] [DEBUG] [CHAT] Init Message Handling [11:28:55 INFO]: [SignedVelocity] [DEBUG] [CHAT] Queueing Next Result [11:28:55 INFO]: [SignedVelocity] [DEBUG] [CHAT] Future Done: true [11:28:55 INFO]: [SignedVelocity] [DEBUG] [CHAT] Waiting for next result [11:28:55 INFO]: [SignedVelocity] [DEBUG] [CHAT] Next Result [11:28:55 INFO]: [SignedVelocity] [DEBUG] [CHAT] Cancelled Message. [11:28:55 INFO]: [SignedVelocity] [DEBUG] Original Message: Test [11:28:55 INFO]: [SignedVelocity] [DEBUG] [CHAT] Result applied

AlessioDP commented 10 months ago

I cannot understand it correctly without the server log but just those messages, but the problem is that this is not an issue of Parties but something else that is not handling events correctly.

Parties in velocity cancels the event and with SignedVelocity is sent the canceled message to sub servers. If SignedVelocity is correctly setup, it handles the message in sub servers and cancel that event too. If SignedVelocity does not work correctly in sub server, it happens what you said.

GrimPlayzs commented 10 months ago

You said in your test that you didn't have this issue. Could another plugin I have installed be causing this? The only other plugin I have on that sub-server that does something with the chat is FreedomChat.

AlessioDP commented 10 months ago

It may be, if a plugin does not check that an event is cancelled before handle the message, its an issue.

GrimPlayzs commented 10 months ago

No, it is not that plugin. I started the server without that plugin and it still happens.

AlessioDP commented 10 months ago

Send full both server logs please with you/someone that executes a party message with chat (/party chat on).

GrimPlayzs commented 10 months ago

Alright will do.