on 1:TEXT:!permit*:#:{
if $hget(ops,$nick) == $null /halt
/set %Linkers %Linkers $chr(124) $+ $$2 $+ $chr(124))
/msg $chan $$2 you have %linkdelay seconds to post a link
/timer $+ $$2 1 %linkdelay /set %Linkers $remove(%Linkers, $chr(124) $+ $$2 $+ $chr(124) )
}
on 1:TEXT:!regular*:#:{
if $hget(ops,$nick) == $null /halt
if $hget(regulars,$$2) {
/hdel regulars $$2
/msg $chan $$2 removed from the list of users permitted to always post links
/halt
}
if !$hget(regulars,$$2) {
/hadd -m regulars $$2 $ctime
/msg $chan $$2 added to list of users permitted to always post links
/halt
}
}
on 1:TEXT:*:#:{
/set %linker $chr(124) $+ $nick $+ $chr(124)
if $hget(subscribers,$nick) {
/halt
}
if $hget(regulars,$nick) {
/halt
}
if $hget(ops, $nick) {
/halt
}
if %linker isin %Linkers {
/halt
}
if $regex(url, $1-, \b[a-zA-Z0-9._%+-]+\.(?:[a-zA-Z]{2}|aero|asia|biz|cat|com|coop|eus|gal|info|int|jobs|mobi|museum|name|net|org|post|pro|tel|travel|xxx|edu|gov|mil)\b) {
/msg $chan You are not permitted to post links $nick $+ ! Either subscribe (Subscribers can always post links), or ask a moderator for permission to post a link first.
/msg $chan .timeout $nick %banlength
/halt
}
if http: isin $1- {
/msg $chan You are not permitted to post links $nick $+ ! Ask a moderator for permission first.
/msg $chan .timeout $nick %banlength
/halt
}
/set %Linkers $remove( %Linkers, $chr(124) $+ $$2 $+ $chr(124) )
}
on 1:action:*:#:{
/set %linker $chr(124) $+ $nick $+ $chr(124)
if $hget(subscribers,$nick) {
/halt
}
if $hget(regulars,$nick) {
/halt
}
if $hget(ops, $nick) {
/halt
}
if %linker isin %Linkers {
/halt
}
if $regex(url, $1-, \b[a-zA-Z0-9._%+-]+\.(?:[a-zA-Z]{2}|aero|asia|biz|cat|com|coop|eus|gal|info|int|jobs|mobi|museum|name|net|org|post|pro|tel|travel|xxx|edu|gov|mil)\b) {
/msg $chan You are not permitted to post links $nick $+ ! Either subscribe (Subscribers can always post links), or ask a moderator for permission to post a link first. (Banned from posting for %bandelay seconds)
/msg $chan .timeout $nick %banlength
/halt
}
if http: isin $1- {
/msg $chan You are not permitted to post links $nick $+ ! Ask a moderator for permission first.
/msg $chan .timeout $nick %banlength
/halt
}
/set %Linkers $remove( %Linkers, $chr(124) $+ $$2 $+ $chr(124) )
}