Boop - Notifies you when you're mentioned in chat

Nucleus is pretty modular and works with most plugins, even chat ones. Your Boop is basically stripping format, and overriding everything. I don’t see why Boop should be picking up all messages, including MOTDs.

On the contrary - I have carefully designed the color-adding part so that it preserves as much formatting from the original text as possible. If you can see where I am ‘stripping the format’, please point it out to me.

name{}: If recolor is true, then the instance of the mention (e.g. @pie_flavor) is colored with the color color. If color-all is true, then the instance of the mention is colored with the color alt-color for everyone who is not its target

Currently, all chat messages, regarding if they are with a ping or not, get formatted. Don’t think that is supposed to happen. My issue is not the ping itself, but the fact that it simply targets all chat messages, even once the server has restarted and there have been no pings since. I am trying to report the fact that it’s stripping formatting from everything, and not just the messages it handles.

… Yes. I know what my documentation says. Not sure that’s evidence of my code stripping all formatting and doing it myself. Like I said, I explicitly wrote it to keep as much of the original formatting as possible. And it also explicitly checks whether there is a ping in the chat before applying any color.[quote=“pie_flavor, post:104, topic:15672”]
If you can see where I am ‘stripping the format’, please point it out to me.
[/quote]

Edit: Misread post, now I see what the doc quote is for. What I’m saying is that everything you’re saying, I was very sure to prevent. Thus, there’s something I’m missing, and will keep missing until someone points it out, or it’s a problem with Nucleus.

That, is what I was referring to. Latest Boop, no Nucleus. You should test it before anything, here’s my config.

With Nucleus, it removes formatting because the &a is a minecraft colour code that if applied last before the message goes out, it will strip all previous colour codes. Or at least, that’s my user-theory. I am no developer, but without any other chat formatting plugin, Boop is causing all my messages to go green, as soon as the server restarts - no booping is even required.

I have found the issue. You hadn’t said what color it was, or that you were using the full message-recolor, so I had assumed you were talking about them being yellow, which had made me incredibly confused. Looks like I broke that when I added colors for non-targets.

A new version has been released for Boop, it is available for download here.


Fixed a bug where message recoloring, if enabled, would apply without needing boops.

I think it still messes up nucleus’ staff chat formatting

Config, text, expected formatting, actual formatting?

Config: groups=[ staff]message { color=green recolor=false}name { - Pastebin.com

Expected formatting is message-template="&7[&3SC&7]{{displayname}}&7: <msg>"
and the actual formatting is just plain white text, no prefixes, suffixes, displayname whatsoever.

Do not have a screenshot right now but I hope my explanation is sufficient.

I know what the issue is, and known about it for some time. I think it boils down to a weakness in the Sponge API, and I’d like to redevelop MessageChannels a bit once I get to a sane point with my command stuff.

The problem is that we both want to use MessageChannels to format our chat. Nucleus’ staff chat channel code is here. Note that I override the send function, this is because I don’t want to us the transformMessage method to modify the message for as many players as required - saving CPU time. This is important later.

What Boop does is that when it detects a chat message, it gets the members of the chat channel, then replaces the chat channel with its own channel, only preserving the member list. As a result, the message will still go to the right players, but the message will only go through Boop’s transformations, and not Nucleus’. Thus, you see a non-transformed message when no players are mentioned.

However, there isn’t really anything Boop can do to get around this cleanly - the only to do so would depend on developers overriding the transformMessage method for formatting only and wrapping instances calling into this method - but for reasons above, I haven’t done that. Calling into send would make no sense - because you’d call into it, then the message would have been sent before you’ve had a chance to mess with it yourself - that is, you could only pre-process a message, but not post process, which is what Boop would want to do.

So, it thus becomes clear that the problem with Message Channels is that the message sending and message formatting are not sufficiently split up, the send function really can perform two functions, formatting and sending, but only one of these needs to be overridden/chained (formatting). I think what needs to happen is that a MessageChannel should contain a member list, and a separate function for formatting messages (that does not send the message to the user and is not user specific). The send function should not be overridable, and would call this formatting method (which could call into wrapped formatting methods), followed by the transformMessage method.

It might just be that, in the end, MessageChannel#send would have to be moved to Server#broadcastToChannel(MessageChannel, ...) - though this would have the benefit of being able to fire the MessageChannel event every time a message channel is used.

TL;DR: I don’t think either of us are doing it wrong, but it’s not very simple to get that right. Thrown down some thoughts as to what could be done - not sure what to do about it yet!

4 Likes

A new version has been released for Boop, it is available for download here.


  • Added player aliases.
  • Made the message channel accessible by plugins.

A new version has been released for Boop, it is available for download here.


Added channel blacklists! Nucleus staff chat is no longer borked!

I have a suggestion that if the plugin owns a command for players used to ignore someone or toggle off this function, it is better.

I unfortunately having some problems finding out the versioning myself on your page. Even the download page listing all of versions does not seems to indicate what API they are expected to be operating on.

Could you please help me with understand this?

Uh, yes it does.

Anyway, it should work with API 6 as well since they didn’t change the chat API, but no guarantee on API 7 yet.

Just an official statement that the latest version of Boop works with API 7 as well.

A new version has been released for Boop, it is available for download here.


Updated bStats to be compatible with Ore metrics guidelines.

1 Like

Hey I know the last update of Boop was years ago but I know it still works. It has always worked for me until I noticed something recently, if I have griefdefender installed alongside it, boop will no longer play a sound and show title message when someone is booped, but coloring the boop message still works fine. I contacted the dev of griefdefender (bloodshot) but he told me I should contact you instead. GD is the only plugin that does this, easily reproducible by adding/removing GD when booting the server. Boop works with hundreds of other plugins I have so this is kinda confusing