mIRC Home    About    Download    Register    News    Help

Print Thread
#247883 02/09/14 10:51 PM
Joined: Sep 2014
Posts: 6
H
heady Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: Sep 2014
Posts: 6
Hey everyone.
I'm using this antilink script.
Code:
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 . $&
        !
    }
  }
}


I already tried to make him ignore person who are in this script, so they wont get a timeout if they're added by me to the reglist.
But i didnt had a success with it.
Code:
on *:TEXT:!reg add*:#: {
  if ($nick isop #) {
    set %reglist. $+ $chan $addtok($($+(%,reglist.,$chan),2), $3, 44)
    msg # $3 Has been added to my regular list.
  }
  else {
    msg # Sorry $nick $+ , you do not have permission to add people to the regular list
  }
}

on *:TEXT:!reg del*:#: {
  if ($nick isop #) {
    set %reglist. $+ $chan $remtok($($+(%,reglist.,$chan),2), $3, 44)
    msg # $3 Has been removed from the regular list.
  }
  else {
    msg # Sorry $nick $+ , you do not have permission to add people to the regular list.
  }
}




Joined: Sep 2014
Posts: 6
H
heady Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: Sep 2014
Posts: 6
Can someone help me??
I'm using another script
Code:
on $@*:text:*:#:{
  if ($regex($1-,/.+\.(com|co|uk|net|org|gov|tv|edu|tk)/iS)) && ($nick !isop $chan) {
    if (!$istok(%permit,$nick,32)) {
      msg $chan $Nick ask for mods permissions to post links!
      msg $chan /timeout $nick 1
    }
  }
  noop $regex($1-,/^!(del|apermit|permit)\s(\S+)/iS) { 
    if ($regml(1) == apermit) && ($nick isop $chan) {
      if ($istok(%permit,$regml(2),32)) {
        msg $chan $regml(2) is already on always permit list
      }
      else {
        set %permit $addtok(%permit,$regml(2),32)
        msg $chan $regml(2) You are now always permited to post links
      }
    }
    if ($regml(1) == permit) && ($nick isop $chan) {
      set %permit $addtok(%permit,$regml(2),32)
      .timerunset 1 20 set %permit $remtok(%permit,$regml(2),1,32)
      msg $chan $regml(2) You have 20 seconds to post a link in here
    }
    if ($regml(1) == del) && ($nick isop $chan) {
      if ($istok(%permit,$regml(2),32)) {
        set %permit $remtok(%permit,$regml(2),1,32)
        msg $chan $regml(2) erased suceffully from always permit list
      }
    }
  }
}

And now i want to the apermit command to be seperated for different channels.
Would be nice if someone could help me smile

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Try to use this module: http://hawkee.com/snippet/16091/


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Sep 2014
Posts: 6
H
heady Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: Sep 2014
Posts: 6
Thanks!
But can i also give this person a permission like in the script i posted for 20 secs?

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Yes you can i wrote it on the page, try to use:

!urlperm NICK SECONDS

e.g: !urlperm add westor 30 = This will allow the westor nickname to post links for 30 seconds.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Sep 2014
Posts: 6
H
heady Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: Sep 2014
Posts: 6
Ah sorry, didnt notice it ^^
But would it be too much work if i would ask you to edit the one i posted so it makes it for different channels?

Thank you for your help.

Joined: Sep 2014
Posts: 52
Babel fish
Offline
Babel fish
Joined: Sep 2014
Posts: 52
This is working for me. I changed !del to !adel to remove permitted users
Code:
on $@*:text:*:#: {
  if ($regex($1-,/.+\.(com|co|uk|net|org|gov|tv|edu|tk)/iS)) && ($nick !isop $chan) {
    if (!$istok(%permit,$chan $+ . $+ $nick,32)) {
      msg $chan $nick ask for a mods permissions to post links!
      msg $chan /timeout $nick 1
    }
  }
  noop $regex($1-,/^!(adel|apermit|permit)\s(\S+)/iS) { 
    if ($regml(1) == apermit) && ($nick isop $chan) {
      if ($istok(%permit,$chan $+ . $+ $regml(2),32)) {
        msg $chan $regml(2) is already on the Always Permit list.
      }
      else {
        set %permit $addtok(%permit,$chan $+ . $+ $regml(2),32)
        msg $chan $regml(2) $+ , you are now always permitted to post links.
      }
    }
    if ($regml(1) == permit) && ($nick isop $chan) {
      set %permit $addtok(%permit,$chan $+ . $+ $regml(2),32)
      .timerunset 1 60 set %permit $remtok(%permit,$chan $+ . $+ $regml(2),1,32)
      msg $chan $regml(2) you have 1 minute to post a link!
    }
    if ($regml(1) == adel) && ($nick isop $chan) {
      if ($istok(%permit,$chan $+ . $+ $regml(2),32)) {
        set %permit $remtok(%permit,$chan $+ . $+ $regml(2),1,32)
        msg $chan $regml(2) was successfully removed from the Always Permit list.
      }
    }
  }
}

Joined: Sep 2014
Posts: 6
H
heady Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: Sep 2014
Posts: 6
Thank you, i tried it and it works!
I really appreciate your help!

Originally Posted By: paper0rplastic
This is working for me. I changed !del to !adel to remove permitted users
Code:
on $@*:text:*:#: {
  if ($regex($1-,/.+\.(com|co|uk|net|org|gov|tv|edu|tk)/iS)) && ($nick !isop $chan) {
    if (!$istok(%permit,$chan $+ . $+ $nick,32)) {
      msg $chan $nick ask for a mods permissions to post links!
      msg $chan /timeout $nick 1
    }
  }
  noop $regex($1-,/^!(adel|apermit|permit)\s(\S+)/iS) { 
    if ($regml(1) == apermit) && ($nick isop $chan) {
      if ($istok(%permit,$chan $+ . $+ $regml(2),32)) {
        msg $chan $regml(2) is already on the Always Permit list.
      }
      else {
        set %permit $addtok(%permit,$chan $+ . $+ $regml(2),32)
        msg $chan $regml(2) $+ , you are now always permitted to post links.
      }
    }
    if ($regml(1) == permit) && ($nick isop $chan) {
      set %permit $addtok(%permit,$chan $+ . $+ $regml(2),32)
      .timerunset 1 60 set %permit $remtok(%permit,$chan $+ . $+ $regml(2),1,32)
      msg $chan $regml(2) you have 1 minute to post a link!
    }
    if ($regml(1) == adel) && ($nick isop $chan) {
      if ($istok(%permit,$chan $+ . $+ $regml(2),32)) {
        set %permit $remtok(%permit,$chan $+ . $+ $regml(2),1,32)
        msg $chan $regml(2) was successfully removed from the Always Permit list.
      }
    }
  }
}


I have another question, i'm using a raffle/giveaway script and when people are buying tickets it puts their name equal the amount of the tickets in a file. So my question is now, after i roll a winner, is there a option to delete his name from the file? I'm using /write -c but it only deletes the line, which was given to me.

Last edited by heady; 23/10/14 10:11 PM.

Link Copied to Clipboard