Stop people advertising IPs?

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

  1. Offline


    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


  4. Offline


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


    Would be great.
  6. Offline


    This is possible, tough its very hard since this will happen:
    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


    First replace all spaces with nothing,then replace all 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


    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.

    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


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


    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


    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


    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


  16. Offline


    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


    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


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


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


    Yeah, thanks.

Share This Page