on *:text:The moderators of this room are*:?:{
/hfree ops
/hmake ops
if ($nick != jtv) return
/hadd -m ops [yourbroadcaster name] $ctime
/var %count = $numtok($remove( $7- , $chr(32) ) , 44)
var %i = 1
while (%i <= %count) {
hadd -m ops $gettok($remove( $7- , $chr(32) ) ,%i,44) $ctime
inc %i
}
echo -a The number of ops is %count
}
on *:text:SPECIALUSER & subscriber:?:{
if ($nick != jtv) return
hadd -m subscribers $2 $ctime
}
on 1:JOIN:#:{ /hdel subscribers $nick }
on 1:TEXT:!permit*:#:{
if !$hget(ops,$nick) { /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) { /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:!ban*:#:{
if !$hget(ops,$nick) { /halt }
/msg $chan .ban $$2
}
on 1:TEXT:!checksub*:#:{
if !$hget(ops,$nick) { /halt }
if $hget(subscribers, $$2) {
/msg $chan $$2 is a current subscriber!
/halt
}
if !$hget(subscribers, $$2) {
/msg $chan $$2 is either not a current subscriber, or the bot just hasn't seen them in a while.
/halt
}
}
on 1:TEXT:!unban*:#:{
if !$hget(ops,$nick) { /halt }
/msg $chan .unban $$2
}
on 1:TEXT:!timeout*:#:{
if !$hget(ops,$nick) { /halt }
/msg $chan .timeout $$2 $$3
}
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. (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. (Banned from posting for %banlength seconds)
/msg $chan .timeout $nick %banlength
/halt
}
/set %Linkers $remove( %Linkers, $chr(124) $+ $$2 $+ $chr(124) )
if $calc($ctime - $hget(subscribers,$nick)) > 86400 { /hdel subscribers $nick }
}
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. (Banned from posting for %banlength seconds)
/msg $chan .timeout $nick %banlength
/halt
}
/set %Linkers $remove( %Linkers, $chr(124) $+ $$2 $+ $chr(124) )
if $calc($ctime - $hget(subscribers,$nick)) > 86400 { /hdel subscribers $nick }
}