Link Block - 08/04/14 06:24 PM
I am making a Twitch chat bot and I can't seem to find a fully working Link block for all links?
on *:text:*.com*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*www.*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*http*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*https*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*.info*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*.uk*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! }
on *:TEXT:!reg add*:#: { if ($nick isop #) { write reglist.txt $$3 msg $chan $$3 has been added to the regular list! } if ($read(reglist.txt,nw,$nick)) { write reglist.txt $$3 msg $chan $$3 has been added to the regular list! } } on *:TEXT:!reg del*:#: { if ($nick isop #) { if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt msg # $$3 has been removed from the regular list! } if ($read(reglist.txt,nw,$nick)) { if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt msg # $$3 has been removed from the regular list! } }
on *:TEXT:!permit*:#: { if ($nick isop #) && ($2) { write reglist.txt $2 msg # $2 has been permited to post a link for 20 seconds .timerRemovePermit 1 20 RemovePermit # $2 } if ($read(sreglist.txt,nw,$nick)) && ($2) { write reglist.txt $2 msg # $2 has been permited to post a link for 20 seconds .timerRemovePermit 1 20 RemovePermit # $2 } }
on *:text:*.com*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*www.*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*http*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*https*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*.info*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*.uk*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! }
on *:TEXT:!reg add*:#: { if ($nick isop #) { write reglist.txt $$3 msg $chan $$3 has been added to the regular list! } if ($read(reglist.txt,nw,$nick)) { write reglist.txt $$3 msg $chan $$3 has been added to the regular list! } } on *:TEXT:!reg del*:#: { if ($nick isop #) { if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt msg # $$3 has been removed from the regular list! } if ($read(reglist.txt,nw,$nick)) { if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt msg # $$3 has been removed from the regular list! } }
on *:TEXT:!permit*:#: { if ($nick isop #) && ($2) { write reglist.txt $2 msg # $2 has been permited to post a link for 20 seconds .timerRemovePermit 1 20 RemovePermit # $2 } if ($read(sreglist.txt,nw,$nick)) && ($2) { write reglist.txt $2 msg # $2 has been permited to post a link for 20 seconds .timerRemovePermit 1 20 RemovePermit # $2 } }
on *:text:*.com*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*www.*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*http*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*https*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*.info*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! } on *:text:*.uk*:#:{ if ($read(reglist.txt,nw,$nick)) return Msg # .timeout $nick 1 Msg # Stop posting links! }
if ($nick(#,$nick,a,r)) return
if ($nick(#,$nick,a,r)) return
if ($nick(#,$nick,a,r)) return else { timeout .. ask for permission (your code here)..