Links Remover

Platform:  mIRC
Published  Dec 13, 2010
Updated  Dec 13, 2010
Removes Links that people post.

On/off '!link on' / '!link off'

and to let someone post a link do.

'!permit you' person has 30 seconds to post a link. on @*:text:*:#:linkpost $1-
on @*:action:*:#:linkpost $1-
on @*:notice:*:#:linkpost $1-
alias -l linkpost {
if ((!%p) && (!$hfind(permit,$nick))) { inc -u4 %p
var %purge /^!(link\so(n|ff)|(permit))\b/iS
var %domain com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk
var %link /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domain $+ )\b/iS
if ($findtok(%chanon,#,1,32)) && ($nick(#,$nick,vr)) && ($regex($1-,%link)) {
kick # $nick | /mode # -b $nick
msg # $nick You did not have permission to post a link ask a mod to !permit you
}
elseif (($regex($1-,%purge)) && ($regml(1) = permit) && ($nick isop #) && ($$2 ison #)) {
hadd -mz permit $v1 30 | notice $v1 You have 30 seconds to post a link. Starting now!
}
elseif (($regml(1) = link on) && ($nick isop #)) {
goto $iif(!$istok(%chanon,#,32),a,b) | :a | set %chanon $addtok(%chanon,#,32)
.msg # My Link Protection Is Now on in: $+($chr(2),#)
halt | :b | .msg # $nick $+ , my link protection is already on in $&
$+($chr(2),#,$chr(2)) !
}
elseif (($regml(1) = link off) && ($nick isop #)) {
goto $iif($istok(%chanon,#,32),c,d) | :c | set %chanon $remtok(%chanon,#,1,32)
.msg # My Link Protection Is Now off in: $+($chr(2),#)
halt | :d | .msg # $nick $+ , My link protection is already off . $&
!
}
}
}

Comments

Sign in to comment.
gamewar   -  Aug 29, 2012
By chance you will not have the command of !permit only? Regards
 Respond  
turbuiance   -  Jan 12, 2012
this only seems to work sometime when i try to turn on...
I had to change command to !links on/off because some chats on server auto *** the word link.. Not sure why its not responding to turning on and off on commands sometimes but works fine other times..
 Respond  
xbox_gamer1   -  Jun 11, 2011
:)
 Respond  
Jethro   -  Jun 11, 2011
xbox, the $v1 in the code followed by the last if condition refers to $2, so there is no difference if you change it to $2.

The overall code could be improved further, but I see Ryan wanted to take it up a notch with his own twist...so I'll leave it at that.
 Respond  
xbox_gamer1   -  Jun 11, 2011
why $v1 your not trying to permit yourself are you?

look at this line

Code

 


change $v1 to $2

now it should be

Code

 




 Respond  
Jethro   -  Dec 13, 2010
Not "looks like." IT IS my regex code. lol

Wait...the halt is needed because he uses goto, Ghost-writer. Also, if the pipe ain't cool to you, I don't reckon you'll like regex much. :P
 Respond  
napa182   -  Dec 13, 2010
looks like a merge of something Jethro_ did that you pieced together tbh.
 Respond  
Tidum   -  Dec 13, 2010
lol Ghost-writer, anything good about it?
 Respond  
Ghost-writer   -  Dec 13, 2010
Pipes ain't cool. "|"
Halt ain't cool.
Why only 30 seconds to post a link?
Interesting use of regex o.o.
 Respond  
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.