Example:
on @!*:text:*:#:if (%Link. [ $+ [ # ] ] = yes) { Linkick $strip($1-) }
on @!*:action:*:#:if (%Link. [ $+ [ # ] ] = yes) { Linkick $strip($1-) }
alias -l Linkick {
var %l = $strip($1-)
if (@ isin %l) || ($regex(#,$nick)) || ($nick(#, $nick, '.@)) halt
;if ($regex(%l,/(https?|www|irc|ftp)$+[[:punct:]])/i) || ($regex(%l,/\.(com|net)$)/i) urlkick
if ($regex(%l,/(https?|www|irc|ftp)(\:|\.)$)/i) || ($regex(%l,/\.(com|net)$)/i) urlkick
;elseif ($regex(%l,/(grupos|groups|chats)*(msn|buzzen|legion|vsixc)$)/i) message
elseif ($regex(%l,/(gro?upo?s|chats)?(msn|buzzen|legion|vsixc)$)/i) message
halt
}
menu channel {
-
Protection
.$Iif(%Link. [ $+ [ # ] ] == yes, $Style(1)) Spam Protection: {
Set %Link. [ $+ [ # ] ] $Iif(%Link. [ $+ [ # ] ] == yes, no, yes)
Echo -at * 0Spam Protection $Iif(%Link. [ $+ [ # ] ] == yes, Activated, Desactivated)
}
}
-
Urlkick and messages are alias you can put whatever you want in that alias.
Next of ";" theres another syntaxis you can test it because I never come back to chat.
This is from my old script modify if you want it, this code dont kick if some one put a email ex: blahblaa@email.com
Im using a modified version of this and it keeps timing out regardless if links are on or off.
Can you help find the problem?