mIRC Home    About    Download    Register    News    Help

Topic Options
#427 - 09/12/02 12:51 AM advertise
KennyJ Offline
Ameglian cow

Registered: 09/12/02
Posts: 25
Loc: Vietnam
These is code for ads, and it works! But everyone type it, and it shun all.
I want it's not to shun when they have OP, oper, and in a specific channel(#staff)
Just these 3 option, then all other will SHUN the nick.

#adver on
on *:text:*:#: {
if (www. isin $1- || http:// isin $1- || irc. isin $1- && webad !isin $1-) {
set %shunnads $nick
shun $nick Please no advertising!
.timer 1 180 unshun %shunnads
}
}
#adver end
_________________________
KennyJ@VietSweet.com

Top
#428 - 09/12/02 02:19 AM Re: advertise
Nick Offline
Bowl of petunias

Registered: 09/12/02
Posts: 2
Loc: St. Louis, MO
#adver on
on *:text:*:#: {
if (www. isin $1-) || (http:// isin $1-) || (irc. isin $1-) && (webad !isin $1-) || ($nick !isop $chan) || ($nick !ison #staff) {
set %shunnads $nick
shun $nick Please no advertising!
.timer 1 180 unshun %shunnads
}
}
#adver end

that should do it...

Top
#429 - 09/12/02 06:21 AM Re: advertise
KennyJ Offline
Ameglian cow

Registered: 09/12/02
Posts: 25
Loc: Vietnam
Hmm.. This make worsier, it will shun everybody that in the room who talk even type "hi"! It will shun everyone on the channel i'm in..
_________________________
KennyJ@VietSweet.com

Top
#430 - 09/12/02 06:57 AM Re: advertise
SWV1 Offline
Self-satisified door

Registered: 09/12/02
Posts: 4
#adver on
on *:text:*:#: {
if (("www." isin $1-) || ("http://" isin $1-) || ("irc." isin $1-) && ("webad" !isin $1-)) && (($nick !isop $chan) || ($nick !ison #staff)) {
set %shunnads $nick
shun $nick Please no advertising!
.timer 1 180 unshun %shunnads
}
}
#adver end

according to your first post , you wanted the script to do nothing if "webad" was included in the text.

This will "shun" any user that types www. or http:// as long as they are not a channel op and are not on #staff

IRC Ops can still be shunned... you need to either check the status of each user before executing the script "/WHOIS <nick>" and then record the "<nick is an IRC Operator" response or you can add IRC Ops to a protect list etc

Top
#431 - 09/12/02 07:01 AM Re: advertise
Hammer Offline
Hoopy frood

Registered: 07/12/02
Posts: 1321
Loc: Georgia, USA
Two things come to mind here. Separate the halting function from the spam check code. Also, it's a good idea to strip codes from $1- to make sure you don't miss color-coded spam.
Code:
#adver on
on @*:TEXT:*:#:{
  if (($nick isop $chan) || ($nick ison #staff) || (webad isin $1-)) halt
  if ((www. isin $strip($1-)) || (http:// isin $strip($1-)) || (irc. isin $strip($1-))) {
    shun $nick Please no advertising!
    .timer 1 180 unshun $nick
  }
}
#adver end
For more help with protection script ideas, have a glance at protection scripts.
_________________________
DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Top
#432 - 09/12/02 12:48 PM Re: advertise
Watchdog Offline
Hoopy frood

Registered: 09/12/02
Posts: 2984
Loc: Hill End, NSW, Australia
Don't worry about protecting opers with this, they are immune to shuns anyway.
_________________________
Induced IRC
irc.induced.net

Top
#433 - 09/12/02 10:41 PM Re: advertise
KennyJ Offline
Ameglian cow

Registered: 09/12/02
Posts: 25
Loc: Vietnam
I'll give it a try to see what it will do. thx all
_________________________
KennyJ@VietSweet.com

Top