Advertisement
Guest User

Link Protection

a guest
Jul 23rd, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. on @*:text:*:#:linkpost $1-
  2. on @*:action:*:#:linkpost $1-
  3. on @*:notice:*:#:linkpost $1-
  4. alias -l linkpost {
  5. if ((!%p) && (!$hfind(permit,$nick))) { inc -u4 %p
  6. var %purge /^!(link\so(n|ff)|(permit))\b/iS
  7. var %domain com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk
  8. var %link /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domain $+ )\b/iS
  9. if ($findtok(%chanon1,#,1,32)) && ($nick(#,$nick,vr)) && ($regex($1-,%link)) {
  10. timeout # $nick | /mode # -b $nick
  11. msg # $nick You did not have permission to post a link ask a mod to !permit you
  12. msg # /timeout $nick 1
  13. }
  14. elseif (($regex($1-,%purge)) && ($regml(1) = permit) && ($nick isop #) && ($$2 ison #)) {
  15. hadd -mz permit $v1 30 | notice $v1 You have 30 seconds to post a link. Starting now!
  16. msg # You now have 30 seconds to post a link!
  17. }
  18. elseif (($regml(1) = link on) && ($nick isop #)) {
  19. goto $iif(!$istok(%chanon1,#,32),a,b) | :a | set %chanon1 $addtok(%chanon,#,32)
  20. .msg # My link protection is now on.
  21. halt | :b | .msg # $nick $+ , My link protection is already on. }
  22. elseif (($regml(1) = link off) && ($nick isop #)) {
  23. goto $iif($istok(%chanon1,#,32),c,d) | :c | set %chanon1 $remtok(%chanon,#,1,32)
  24. .msg # My link protection is now off.
  25. halt | :d | .msg # $nick $+ , My link protection is already off. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement