Store
Subscribe
Filters.
Well guys, we all know that when the server has a lot of players on, there is a LOT more trash talking going on. Many players are constantly saying eZ or ease. Why don't we just cancel the message if it contains eZ or any variation of that word. It would keep the chat more cleaner and while we're at it, let it mute the player for 5 minutes the first offense, 15 for the second, an hour for the third, 5 days for the 4th and perm for the 5th . It takes a load off the mods shoulders as well.
 0
PM Link
This was tried a while back and failed
 0
PM Link

HiDD3NxSHAD0W wrote

This was tried a while back and failed


What was wrong with it
 0
PM Link
when you said eZ in chat "I am easy" came up instead. But the problem was when you said ReaVeZz it became ReaVeI am easy. So we shut it down.
 0
PM Link
filtering one word will barely do anything. people will always find another variation (when eZ was filtered people said "ease")
 0
PM Link

ZombieForce wrote

when you said eZ in chat "I am easy" came up instead. But the problem was when you said ReaVeZz it became ReaVeI am easy. So we shut it down.


Theres a way to fix that, when checking for the term eZ, if(message.contains.equalsIgnoreCase(" ez " || " ease " replace " ez ", " ")){ You put space between the message before that and after that


The code would look something like that. I just thought of that off the top of my head
 0
PM Link
I coded a small plugin for this:

BadlionFilter

 0
PM Link

Cavasi wrote

I coded a small plugin for this:

BadlionFilter



It's a good first attempt. Some things to consider:
1. What happens when the chat message starts with those? There is no beginning space.
2. What happens if that section is the last thing. Now that end space doesn't exist, so it doesn't match.
3. Wouldn't it be better just to cancel the event and send them a warning of what not to say, instead of flooding the chat with "I am easy"?
4. Efficiency. It would be much easier to just cancel it the first time you encounter a bad phrase. This way you could use else if's instead, and as soon as it finds one it can stop checking the message.
5. Look into a term called regex (regular expressions).
6. Test your code before submitting, as at first glance I don't think it would work. You need to make a listener (let's call it ChatListener) class, throw onChat in there, and attach the listener in your onEnable using something like this "this.getServer().getPluginManager().registerEvents(new ChatListener(this), this);" Make sure your constructor of your chatlistener takes your plugin.

I'm all for people learning how to code minecraft, and code in general. While what you are doing is nice (in attempting to help), I'm already programming a chat filter in my new ban manager that will be integrated into the website and profiles.
 0
PM Link

Archybot wrote


I'm all for people learning how to code minecraft, and code in general. While what you are doing is nice (in attempting to help), I'm already programming a chat filter in my new ban manager that will be integrated into the website and profiles.


Release date: Never

On a serious note I'm going to revisit the chat filter.

@HiddenShadow, it didn't fail, it did EXACTLY what i wanted it to do :) For a while after that there were less ez's.
 0
PM Link

MasterGberry wrote

Archybot wrote...



Release date: Never

On a serious note I'm going to revisit the chat filter.

@HiddenShadow, it didn't fail, it did EXACTLY what i wanted it to do :) For a while after that there were less ez's.


Before I had it cancelling the event but then I thought you guys wanted to get it replaced with I am easy
 0
PM Link

Archybot wrote

Cavasi wrote...



It's a good first attempt. Some things to consider:
1. What happens when the chat message starts with those? There is no beginning space.
2. What happens if that section is the last thing. Now that end space doesn't exist, so it doesn't match.
3. Wouldn't it be better just to cancel the event and send them a warning of what not to say, instead of flooding the chat with "I am easy"?
4. Efficiency. It would be much easier to just cancel it the first time you encounter a bad phrase. This way you could use else if's instead, and as soon as it finds one it can stop checking the message.
5. Look into a term called regex (regular expressions).
6. Test your code before submitting, as at first glance I don't think it would work. You need to make a listener (let's call it ChatListener) class, throw onChat in there, and attach the listener in your onEnable using something like this "this.getServer().getPluginManager().registerEvents(new ChatListener(this), this);" Make sure your constructor of your chatlistener takes your plugin.

I'm all for people learning how to code minecraft, and code in general. While what you are doing is nice (in attempting to help), I'm already programming a chat filter in my new ban manager that will be integrated into the website and profiles.


Also, I feel like you think I'm a retard. I just did this code really fast. Its psuedocode. Also, I have a chat listener, the class implements listener. You Don't need separate classes to code a plugin
 0
PM Link

Cavasi wrote

Archybot wrote...



Also, I feel like you think I'm a retard. I just did this code really fast. Its psuedocode. Also, I have a chat listener, the class implements listener. You Don't need separate classes to code a plugin


You should though: http://en.wikipedia.org/wiki/Object-oriented_programming
 0
PM Link

MasterGberry wrote

Cavasi wrote...



You should though: http://en.wikipedia.org/wiki/Object-oriented_programming


Once again, like I said. I just put it together fast. I dont want to spend so much time on a plugin thats not even going anywhere
 0
PM Link

Cavasi wrote

Once again, like I said. I just put it together fast. I dont want to spend so much time on a plugin thats not even going anywhere


If it worked well and did it's job I don't mind using it. Just gotta be clean etc for future usage.
 0
PM Link
Yeah, we aren't calling you stupid at all. We are bringing up valid points/concerns you should think about when programming. If you think we are being mean you should see our dev chat where we scrutinize every little thing in our plugin development.
 0
PM Link

Archybot wrote

Yeah, we aren't calling you stupid at all. We are bringing up valid points/concerns you should think about when programming. If you think we are being mean you should see our dev chat where we scrutinize every little thing in our plugin development.

If I were a dev I would pay a lot more attention to detail. Since I'm not, I wont
 0
PM Link
3z
 0
PM Link