mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Hello there friends who have decided to help me with this script to make it ... Better..
So far my script is working very decently good But I would like to add some other stuff The script will be at the end
Ok... So first off Let me explain what the script does so far, and this is just a modified version of a script I found on the interwebz.
The script bans any Link that ends with any of the domains in that list. The script also has !permit -name- and !alwayspermit and !del...

Now up to what I need help with and want to add:
1- Specific links, I want to let specific links get through, This bot is made for a stream and sometimes someone will post a link like "battle.net" wich isnt really a link, more like a program used for a game, in theory. So I would like to add links that dont get purged.
2-!permit works fine, But Is there a way to make it instead of:
!permit == you have 60 seconds to post a link
to !permit == you can post a link but after link postage you cannot post links anymore.

3- Is there a way for the bot to ban only links..
For instance I had to delete to check for http//: or www. Because sometimes people would come around and just do a link like "google.com".
Now this has a downside. Lets say people are chatting and someone is like:
"I like to...communicate"
That will get banned, So I need a way to only ban links if possible, and also to ban links with people who are smart and go : google. com (with a space or stuff like such)

This 3rd one isnt so needed but appreciated
Thanks a ton, now here is the script:



Code:
on $@*:text:*:#:{
  if ($regex($1-,/.+\.(com|co|uk|net|org|gov|tv|edu|fm|st|tk|gg|ac|uk|xxx|web|us|me|llc)/iS) && ($nick !isop $chan)) {
    if (!$istok(%permit,$nick,32)) {
      msg $chan Please, $Nick Ask for mods permissions to post links!
      /timerban 1 1 msg # /timeout $nick 1
    }
  }

  noop $regex($1-,/^!(del|alwayspermit|permit)\s(\S+)/iS) { 
    if ($regml(1) == alwayspermit) && ($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 60 set %permit $remtok(%permit,$regml(2),1,32)
      msg $chan $regml(2) You have a minute 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 sucessully from always permit list
      }
      else {
        msg $chan $regml(2) is not on always permit list
      }
    }
  }
}

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
I think this page http://hawkee.com/snippet/16091/ will help you find that you want.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Not rlly... I need what i enlisted there but ty xD

Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Really looking forward for help with this... please smile?

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
One method you could use; get the number of words($0) then while loop through them one at a time and check them against a token variable that contains allowed urls.


Link Copied to Clipboard