[ANY] Smart Link Remover
2 Attachment(s)
Hey0,
This is a small Plugin that removes all links from a Players name Install - Drag 'n' drop the .smx And you're done. Github: https://github.com/Totenfluch/SmartLinkRemover Note: I released this to get input from other developers on how to remove advertisements in names completly and smart. If you have any ideas how to improve this further let me know! Download count ~510 Thanks to AgentWesker and Mitchell for the code improvements! |
Re: [ANY] Smart Link Remover
*redacted, fixed in the newest version*
|
Re: [ANY] Smart Link Remover
Quote:
That was code I used for testing something else and forgot to remove <.< |
Re: [ANY] Smart Link Remover
Nice release, was looking for something like this recently actually! Any chance you'll be doing any improvements/additions to this in the future? If so, a couple suggestions:
- An option for flag-based immunity - A whitelist, without directly modifying the regex expression in the code - for example, I don't mind players who wish to self-advertise their twitch.tv in their names, but don't wish to have any other links in names |
Re: [ANY] Smart Link Remover
Quote:
For Phrases that the regex doesn't catch there will be another database where the admin can target the client and specify the part of the name that is not allowed so the plugin gets it right on the next time. |
Re: [ANY] Smart Link Remover
Here is a slightly improved Regex from testing on our server:
((http:[/]{2}|https:[/]{2}|www[.])?[-a-zA-Z0-9]{2,}[.][a-zA-Z]{2,5}) https://i.imgur.com/xwGMP3G.png I also modified your code to loop through each match in case of multiple links. Edit: Fixes have been merged https://github.com/Totenfluch/SmartLinkRemover |
Re: [ANY] Smart Link Remover
Depends how intrusive you want to be as something like:
"HD.mtch" Is not a url, but "mtch.tech" is a url. |
Re: [ANY] Smart Link Remover
Quote:
|
Re: [ANY] Smart Link Remover
Quote:
edit: there's 882 domain extensions and growing pretty fast. |
Re: [ANY] Smart Link Remover
Quote:
the MAX_NAME_LENGTH makes it literally impossible to have two links in a name that's why I didn't implement it Other than that your regex looks extremly solid with 0 false positives and all matches in my ~350 name test - Well done! If you send me a pull requests I'll merge it we're having a discussion here: https://github.com/Totenfluch/SmartLinkRemover/pull/1 if you want to join |
All times are GMT -4. The time now is 18:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.