SReject commented on a Page, Kick for posting link  -  Dec 07, 2011

@Jethro: I understand this, and if you take a closer look at my regex you will notice that http:// and www. are optional. I added them for speed purposes

@Turbiance, Here you go, an on/off version of my simple script:

alias LinkKick {
  if ($isid) {
    return $($+(%,LinkKick:,$chan),2)
  }
  elseif ($($+(%,LinkKick:,$chan),2)) {
    unset $+(%,LinkKick:,$chan)
  }
  else {
    set $+(%,LinkKick:,$chan) $true
  }
}

menu Channel {
  $iif($LinkKick,Disable,Enable) LinkKick:LinkKick-Toggle
}

on @*:text:*:#:{
  if ($LinkKick) {
    var %m = /(?:(?:https?:\/\/(?:www\.)?)|ftps?:\/\/|www\.)?\S+\.(?:[a-z]{2,4}|musuem)\b/iS
    if ($regex($1-,%m)) {
      ban -ku30 $chan $Nick 2 Please don't spam the channel.
    }
  }
}
 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.