Allow Links mIRC Script

Moderator: GeekShed.Net Staff

Allow Links mIRC Script

Postby TweakUniverse » Mon Aug 09, 2010 7:05 pm

Code: Select all
on *:TEXT:+links on:#: {
  if ($nick isop $chan) {
    msg $chan Links are now on. You may not post any links. If you do you will be kicked.
    set %links on
  }
}
on *:TEXT:+links off:#: {
  if ($nick isop $chan) {
    msg $chan Links are now off. You may post any links IF the owner allows it. If the owner dosen't allow it you will be kicked.
    set %links off
  }
}
on *:text:*.com*:#: {
  if (%links == on) {
    set %linknick $nick
    msg ChanServ kick $chan %linknick
  }
}
on *:text:*.org*:#: {
  if (%links == on) {
    set %linknick $nick
    msg ChanServ kick $chan %linknick
  }
}
on *:text:*.tv*:#: {
  if (%links == on) {
    set %linknick $nick
    msg ChanServ kick $chan %linknick
  }
}
on *:text:*.net*:#: {
  if (%links == on) {
    set %linknick $nick
    msg ChanServ kick $chan %linknick
  }
}
on *:text:*.co*:#: {
  if (%links == on) {
    set %linknick $nick
    msg ChanServ kick $chan %linknick
  }
}


Just paste this into the Remote tab and it's all done.

To turn on links do +links on and to turn off links do +links off

To add more endings to kick such as .ly just add in this
Code: Select all
on *:text:*.ly*:#: { <----- Here is were i added the new ending :)
  if (%links == on) {
    set %linknick $nick
    msg ChanServ kick $chan %linknick
  }
}


I haven't added the allow certain links like GeekShed.net and it won't kick. I will update this topic once i do.
Hope you like it :)
User avatar
TweakUniverse
 
Posts: 4
Joined: Sat May 29, 2010 6:06 pm

Re: Allow Links mIRC Script

Postby MartyniP » Fri Aug 13, 2010 12:05 pm

I would think having all the kicks in 1 function would be better and easier to edit, if in futer you wanted to change the kick msg or change it to a ban

on *:TEXT:+links on:#: {
if ($nick isop $chan) {
msg $chan Links are now on. You may not post any links. If you do you will be kicked.
set %links on
}
}
on *:TEXT:+links off:#: {
if ($nick isop $chan) {
msg $chan Links are now off. You may post any links IF the owner allows it. If the owner dosen't allow it you will be kicked.
set %links off
}
}
on *:text:*:#: {
if (.com isin $1-) || (.org isin $1-) || (.tv isin $1-) || (.net isin $1-) || (.co isin $1-) {
if (%links == on) {
kick $chan $nick Please do not post links in $chan
}
}
}

or then again, you could see if it is in link format

on *:text:*:#: {
if ( *.*.* iswm $1-) {
if (%links == on) {
kick $chan $nick Please do not post links in $chan
}
}
}
MartyniP
 
Posts: 8
Joined: Sun Mar 07, 2010 3:07 pm
Location: England

Re: Allow Links mIRC Script

Postby GrimReaper » Sat Aug 14, 2010 1:01 pm

Where you have

Code: Select all
 on *:TEXT:+links on:#: {
  if ($nick isop $chan) {
    msg $chan Links are now on. You may not post any links. If you do you will be kicked.
    set %links on
  }
}
on *:TEXT:+links off:#: {
  if ($nick isop $chan) {
    msg $chan Links are now off. You may post any links IF the owner allows it. If the owner dosen't allow it you will be kicked.
    set %links off
  }
}


You could have

Code: Select all
on *:TEXT:+links*:#: {
  if ($nick isop $chan) {
    if (!$2) { msg $chan * Syntax: +links on/off }
    if ($2 == on) {
      msg $chan Links are now on. You may not post any links. If you do you will be kicked.
      set %links on
    }
    if ($2 == off) {
      msg $chan Links are now off. You may post any links IF the owner allows it. If the owner dosen't allow it you will be kicked.
      set %links off
    }
  }
}


Hope this helps.
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.


Return to Script help

Who is online

Users browsing this forum: No registered users and 11 guests

cron