Fully working link block?
#244733
24/03/14 12:39 PM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
I've looked all over the forums for a twitch.tv link block that works but none have. If someone could make one that would /timeout $nick 1 and have a !permit (nick) [would expect a $$2 in there] Here is a broken one someone could just fix up if they don't want to make a whole new one http://pastebin.com/1R9S8TY4
|
|
|
Re: Fully working link block?
[Re: judge2020]
#244746
24/03/14 10:55 PM
|
Joined: Dec 2013
Posts: 779
Nillen
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
The code you presented is already fully working.
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
Re: Fully working link block?
[Re: Nillen]
#244748
26/03/14 12:10 AM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
When i put it in my script and someone post a link it does not to the person or say the message...
|
|
|
Re: Fully working link block?
[Re: judge2020]
#244757
26/03/14 04:31 PM
|
Joined: Dec 2013
Posts: 779
Nillen
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
Do you have any other scripts starting with ? This code will interpret any text made in the chat, thus having any code under this code won't ever be interpreted.
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
Re: Fully working link block?
[Re: Nillen]
#244785
28/03/14 08:19 PM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
yes, i do have TEXT commands. So you say if the script is above the text commands then it will work? I also don't want to break those commands.
|
|
|
Re: Fully working link block?
[Re: judge2020]
#244788
28/03/14 08:52 PM
|
Joined: Dec 2013
Posts: 779
Nillen
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
Combine them then. I assume the other commands you set up use aliases as well? Then you can just combine it by
on *:text:*:#: {
linkpost $1-
otheralias $1-
}
Or you can just take the parts you want out of the alias and make your own code.
var %links /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domains $+ )\b/iS
if ($regex($1-,%links)) {
.msg # /timeout $nick 1
Is quite literally all you'll need to make a link block.
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
Re: Fully working link block?
[Re: Nillen]
#244850
31/03/14 10:19 PM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
Combine them then. I assume the other commands you set up use aliases as well? Then you can just combine it by
on *:text:*:#: {
linkpost $1-
otheralias $1-
}
Or you can just take the parts you want out of the alias and make your own code.
var %links /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domains $+ )\b/iS
if ($regex($1-,%links)) {
.msg # /timeout $nick 1
Is quite literally all you'll need to make a link block. None of my other commands use aliases. So how would i go about this now?
|
|
|
Re: Fully working link block?
[Re: judge2020]
#244868
02/04/14 05:54 PM
|
Joined: Mar 2004
Posts: 359
LostServ
Fjord artisan
|
Fjord artisan
Joined: Mar 2004
Posts: 359 |
None of my other commands use aliases. So how would i go about this now?
The easiest way is to just put the link script into a new remote file. (File > New when you're on the Remotes tab) You can use the View menu option to switch between the different script files in the editor.
|
|
|
Re: Fully working link block?
[Re: LostServ]
#244871
02/04/14 06:24 PM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
None of my other commands use aliases. So how would i go about this now?
The easiest way is to just put the link script into a new remote file. (File > New when you're on the Remotes tab) You can use the View menu option to switch between the different script files in the editor. seems to not be timing people out. Also no error messages come up when a link is posted. help?
|
|
|
Re: Fully working link block?
[Re: judge2020]
#244876
02/04/14 07:40 PM
|
Joined: Mar 2004
Posts: 359
LostServ
Fjord artisan
|
Fjord artisan
Joined: Mar 2004
Posts: 359 |
None of my other commands use aliases. So how would i go about this now?
The easiest way is to just put the link script into a new remote file. (File > New when you're on the Remotes tab) You can use the View menu option to switch between the different script files in the editor. seems to not be timing people out. Also no error messages come up when a link is posted. help? Post the code you have, please. 
Last edited by LostServ; 02/04/14 07:41 PM.
|
|
|
Re: Fully working link block?
[Re: LostServ]
#244884
03/04/14 10:50 AM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
None of my other commands use aliases. So how would i go about this now?
The easiest way is to just put the link script into a new remote file. (File > New when you're on the Remotes tab) You can use the View menu option to switch between the different script files in the editor. seems to not be timing people out. Also no error messages come up when a link is posted. help? Post the code you have, please. I took your advice and put it in a different file: on @*:text:*:#:linkpost $1-
on @*:action:*:#:linkpost $1-
on @*:notice:*:#:linkpost $1-
alias -l linkpost {
if ((!%p) && (!$hfind(permit,$nick))) { inc -u4 %p
var %purge /^!(link\so(n|ff)|(permit))\b/iS
var %domain com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk
var %link /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domain $+ )\b/iS
if ($findtok(%chanon1,#,1,32)) && ($nick(#,$nick,vr)) && ($regex($1-,%link)) {
timeout # $nick | /mode # -b $nick
msg # $nick You did not have permission to post a link ask a mod to !permit you
msg # .timeout $nick 1
}
elseif (($regex($1-,%purge)) && ($regml(1) = permit) && ($nick isop #) && ($$2 ison #)) {
hadd -mz permit $v1 30 | notice $v1 You have 30 seconds to post a link. Starting now!
msg # You now have 30 seconds to post a link!
}
elseif (($regml(1) = link on) && ($nick isop #)) {
goto $iif(!$istok(%chanon1,#,32),a,b) | :a | set %chanon1 $addtok(%chanon,#,32)
.msg # My Link Protection Is Now on in: $+($chr(2),#)
halt | :b | .msg # $nick $+ , my link protection is already on in $&
$+($chr(2),#,$chr(2)) !
}
elseif (($regml(1) = link off) && ($nick isop #)) {
goto $iif($istok(%chanon1,#,32),c,d) | :c | set %chanon1 $remtok(%chanon,#,1,32)
.msg # My Link Protection Is Now off in: $+($chr(2),#)
halt | :d | .msg # $nick $+ , My link protection is already off . $&
!
}
}
}
note: i changed /timeout to .timeout since that changed with a api update
|
|
|
Re: Fully working link block?
[Re: judge2020]
#244886
03/04/14 11:42 AM
|
Joined: Dec 2013
Posts: 779
Nillen
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
note: i changed /timeout to .timeout since that changed with a api update Where did you hear this? lol. /timeout and .timeout both work excellent. The .timeout is just so that you won't get notified of the action in your mIRC application.
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
Re: Fully working link block?
[Re: Nillen]
#244887
03/04/14 12:02 PM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
note: i changed /timeout to .timeout since that changed with a api update Where did you hear this? lol. /timeout and .timeout both work excellent. The .timeout is just so that you won't get notified of the action in your mIRC application. in my recent commands /timeout didn't time the person out, and .timeout did.
|
|
|
Re: Fully working link block?
[Re: judge2020]
#244920
05/04/14 06:29 PM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
tried new remote file and it doesn't fix it 
|
|
|
Re: Fully working link block?
[Re: judge2020]
#244936
06/04/14 07:49 AM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
This may seem like a awful way to link block, but on *:text:*.com*:#:{
if ($read(textfile.txt,nw,$nick)) return
Msg # .timeout $nick 1
Msg # Stop posting links!
}
on *:text:*www.*:#:{
if ($read(textfile.txt,nw,$nick)) return
Msg # .timeout $nick 1
Msg # Stop posting links!
}
Also other on TEXT commands like http, https, info, uk, etc. EDIT: the other script gives error LINKPOST unknown command
Last edited by judge2020; 06/04/14 07:52 AM. Reason: EDIT:
|
|
|
Re: Fully working link block?
[Re: judge2020]
#245277
15/04/14 04:29 AM
|
Joined: Apr 2014
Posts: 33
bl968
Ameglian cow
|
Ameglian cow
Joined: Apr 2014
Posts: 33 |
Since this looks like it is for twitch.tv
ops is a hash table with a list of all of the channel moderators.
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. (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) ) }
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) ) }
|
|
|
Re: Fully working link block?
[Re: judge2020]
#245295
15/04/14 04:45 PM
|
Joined: Mar 2014
Posts: 72
AllDayGrinding
Babel fish
|
Babel fish
Joined: Mar 2014
Posts: 72 |
How do you put code in a different file? I Only put mine in the remote section. Also how do you make new files?
|
|
|
Re: Fully working link block?
[Re: bl968]
#245296
15/04/14 04:47 PM
|
Joined: Mar 2014
Posts: 72
AllDayGrinding
Babel fish
|
Babel fish
Joined: Mar 2014
Posts: 72 |
Could I just copy, paste it into mIRC or will I have to edit any?
|
|
|
Re: Fully working link block?
[Re: AllDayGrinding]
#245297
15/04/14 05:00 PM
|
Joined: Mar 2014
Posts: 215
judge2020
OP
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2014
Posts: 215 |
It should work if you copy and paste it.
|
|
|
Re: Fully working link block?
[Re: judge2020]
#245298
15/04/14 05:40 PM
|
Joined: Mar 2014
Posts: 72
AllDayGrinding
Babel fish
|
Babel fish
Joined: Mar 2014
Posts: 72 |
Where it says %banlength Do I change "Banlength" to a number?
|
|
|
|
|