Stop people advertising IPs?

Discussion in 'Archived: Plugin Requests' started by Shinfo, May 17, 2011.

  1. Offline

    Shinfo

    Is there any way to censor people posting their servers in chat? I find people come in to my server and post their IP's begging people to join. Obviously, I haven't seen many people following but it's the morals. I don't want people advertising on my server. There's a reason server lists exist.
     
  2. I can make something like this for you
     
  3. Offline

    winter4w

    PLZ MAKE ONE I REALLY WILL NEED IT
     
  4. Offline

    winter4w

    Are you making it because ill love you if you do make it :)
     
  5. Offline

    Crayder

    Would be great.
     
  6. Offline

    MuisYa

    This is possible, tough its very hard since this will happen:
    *Thinking*
    What i mean is that the player will just use spaces or anything, so that the censor doesnt detect it as a ip.
     
  7. Offline

    ZephyrSigmar

    First replace all spaces with nothing,then replace all xxx.xxx.xxx.xxx:xxxx and similar format strings with *Censor* :)
     
  8. @ZephyrSigmar: Then I'll write xxx,xxx,xxx,xxx:xxxxx ... block this and I'll write IP: xxx:xxx:xxx:xxx port: xxxxx and so on... ;)
     
  9. Offline

    Wolfy9247

    I've already made this as a plugin request for someone else, it blocks IP's based on a RegEx filter, if any of you have ever used that before.

    http://forums.bukkit.org/threads/ad...r-all-your-anti-publicity-needs-1-1-r1.52457/

    As a quick explanation (if you don't want to look at the source code) it pretty much deletes anything that doesn't match the RegEx filter and deletes all spaces, then checks if it's a VALID IPv4 address, along with if it has any sort of port attached to the end of it. I still need to improve on it, but it's most likely that it'll block almost every time someone posts an IP address. HOWEVER, people always figure out ways to get around things such as placing something like 192[dot]168[dot]1[dot]1 or something along those lines, but I think they'd most likely be banned before going through all the trouble to do that in the first place.

    tl;dr read the source code and you'll be able to find out how it works.
     
  10. Offline

    jorisk322

    and then someone wants to give their coordinates to someone..
     
  11. Offline

    Wolfy9247

    I assume you were meaning to ask what would happen if someone were to try and give their coordinates? If you're using the correct RegEx filter and replacing the correct characters it wouldn't be a problem as coordinates wouldn't come out to any sort of IPv4 address.
     
  12. Offline

    ZephyrSigmar

    V10lator , jorisk322
    Yepp,people are tricky :/
    How about replacing everything with nothing,except numbers,then check for xxxxxxxxxxxxxxx format? (Yes,it should censor the message if someone writing a lot of numbers in their message but it looks like we cannot avoid that)
     
  13. @ZephyrSigmar: Then I will replace 1 eith l, 0 with O, maybe 3 with E, 4 with A, ... xD
    But this is going off topic and there is a plugin from @Wolfy9247. :)
     
    Wolfy9247 likes this.
  14. Offline

    Wolfy9247

    You just use a RegEx filter to delete anything that's not a number or dot and if it matches it then it'll do the specified action. There's really no way to check (without a lot of complications) a long string of numbers to match any valid IPv4 address and/or format of one.
     
  15. Offline

    MuisYa

  16. Offline

    lipe123

    How about not allowing new users to chat at all until they pass a test, just solved every verbal abuse, idiot question, spamming problem.

    pex+modifyworld = win
     
  17. You could just use regex and see if text matches the pattern. A pattern you could use if anyone is interested in doing this

    String pattern = "(\\d{1,3}\\.){3}(\\d{1,3})";

    It may not be exactly right, you may want to test it.
     
  18. Offline

    Phantom Index

    works with HeroChat5?
     
  19. Offline

    Wolfy9247

    It *should* be compatible with it, but I can't gurantee you 100%. Try it out! If it doesn't, I can try and implement the HeroChat API with it, if it's up to date now, since last time I checked HC hadn't updated.

    Either way, to discuss that further PM me or respond to the topic itself. Thanks!
     
  20. Offline

    -_Husky_-

    How about if i wanna advertise my other server, on my server xD is there perm nodes?
     
  21. Offline

    Wolfy9247

    OP's get around the filters by default, if you look at my plugin there are in-fact permission nodes though.
     
  22. Offline

    -_Husky_-

    Yeah, thanks.
     

Share This Page