new URL Blocker

By reider45 on May 31, 2011

this snippet allows you to block url's from your chat, but it also allows you to allow certain links in your chat!

Replace http://google.com http://youtube.com and http://hawkee.com with the links that you want to allow. I dont take FULL credit for this napa did help :).

Be sure to put http:// :).

on $@*:text:/((http\x3A\/\/)?(w{3}\x2E)?\S+\x2E\S{2,3}?\S+)/Si:#:{ 
  if (!$istok(http://google.com|http://youtube.com|http://hawkee.com,$regml(1),124)) {
    kick $chan $nick The url you posted is not allowed in here!
  }
}

Comments

Sign in to comment.
RydeZ   -  Feb 13, 2018

Do you mind updating the script and maybe add where you can make other exception.

Like exception to where user can advertise blocked URL only special user will be able to advertise blocked URL or make it where it won't affect channel OP?

 Respond  
reider45   -  Jun 02, 2011

ummm ok then but i dont make wird scripts like google.name and stufd lol

 Respond  
Jethro   -  Jun 02, 2011

The common domain extensions are mostly 2 to 3 characters long, but there are more characters than that. The longest one has to be .museum, which is 6 characters long. Here is an APPROXIMATE domain extension names for their uses and your reference:> .com — commercial entities
.org — non-profit organizations
.net -Internet infrastructure and network providers
.edu/.ac — educational institutions
.mil — US military
.gov — reserved for US intergovernmental organizations
.int — international organizations
.biz — business web sites
.name — used by individuals or families for personal use
.info — unrestricted extension for informational websites
.pro — for professional organizations and credentialed professionals
.aero — air-transport industry websites
.museum — for museums
.coop — cooperative associations NOTE: This list does not include .ca .it .tw .cn etc...for other country domain extensions.

 Respond  
reider45   -  Jun 02, 2011

wht domain extension is more than 3 characters? name 3

 Respond  
Jethro   -  Jun 02, 2011

reider45, excuse me, at the moment of reading your post above, you've lost me.

 Respond  
Jethro   -  Jun 01, 2011

You could have done it like so:

on $@*:text:/(^| )(http\072\/\/w{3}\.|w{3}\.)(?!hawkee|google|youtube).+(\.\S{2,6})( |$)/Si:#:{
  kick # $nick The URL you posted is not allowed in here!
}

This will exclude URL consists of hawkee, google and youtube. The domain extension can be as long as 6 characters, not just 3.

 Respond  
reider45   -  Jun 01, 2011

i have no clue wht tht means jethro_ lol

 Respond  
Jethro   -  Jun 01, 2011

You can use negative look-ahead assertion to exclude hawkee, youtube and google link to be executed directly, instead of adding an !$istok()

 Respond  
napa182   -  Jun 01, 2011

@Bielie why bother adding a line to message the channel that someone typed a link that is not allowed, when the kick message does that already?
hence "The url you posted is not allowed in here!"

 Respond  
Bielie   -  Jun 01, 2011

You know what i mean :)

 Respond  
reider45   -  Jun 01, 2011

acually the websites in there (google youtube and hawkee) are the websites you are ALLOWING

 Respond  
Bielie   -  Jun 01, 2011

I think you should try to solve the !istok part with something else. Because if someone wants to block more then 3 websited they get way too long lines. Maby an alias that checks a file with the websites in it?

Plus maby add a line that messages the channel that someone has sent a link that isnt allowed. This should be simple to add!

:) For the rest good job!

RydeZ  -  Feb 15, 2018

I believe the script only block URL that is not on the allow list however if the way he has it only allow 3 website then I would agree changing to allow more site.

It would be nice if the owner of this script would update and set it where the bot will not kick staff or add a exception where only those who is on the exception list can post non-allowed domains.

Also the script need updating it should not be kicking bot such as weather bot when user are checking there weather and the weather bot get booted from the channel.

otherwise it is a pretty good script "Good Job" Please update Thank you!

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.