mIRC Home    About    Download    Register    News    Help

Print Thread
advertise #427
09/12/02 12:51 AM
09/12/02 12:51 AM
Joined: Dec 2002
Posts: 25
Vietnam
K
KennyJ Offline OP
Ameglian cow
KennyJ  Offline OP
Ameglian cow
K

Joined: Dec 2002
Posts: 25
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

Re: advertise #428
09/12/02 02:19 AM
09/12/02 02:19 AM
Joined: Dec 2002
Posts: 2
St. Louis, MO
N
Nick Offline
Bowl of petunias
Nick  Offline
Bowl of petunias
N

Joined: Dec 2002
Posts: 2
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...

Re: advertise #429
09/12/02 06:21 AM
09/12/02 06:21 AM
Joined: Dec 2002
Posts: 25
Vietnam
K
KennyJ Offline OP
Ameglian cow
KennyJ  Offline OP
Ameglian cow
K

Joined: Dec 2002
Posts: 25
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..

Re: advertise #430
09/12/02 06:57 AM
09/12/02 06:57 AM
Joined: Dec 2002
Posts: 4
S
SWV1 Offline
Self-satisified door
SWV1  Offline
Self-satisified door
S

Joined: Dec 2002
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

Re: advertise #431
09/12/02 07:01 AM
09/12/02 07:01 AM
Joined: Dec 2002
Posts: 1,321
Georgia, USA
H
Hammer Offline
Hoopy frood
Hammer  Offline
Hoopy frood
H

Joined: Dec 2002
Posts: 1,321
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
Re: advertise #432
09/12/02 12:48 PM
09/12/02 12:48 PM
Joined: Dec 2002
Posts: 2,984
Hill End, NSW, Australia
Watchdog Offline
Hoopy frood
Watchdog  Offline
Hoopy frood

Joined: Dec 2002
Posts: 2,984
Hill End, NSW, Australia
Don't worry about protecting opers with this, they are immune to shuns anyway.


Induced IRC
irc.induced.net
Re: advertise #433
09/12/02 10:41 PM
09/12/02 10:41 PM
Joined: Dec 2002
Posts: 25
Vietnam
K
KennyJ Offline OP
Ameglian cow
KennyJ  Offline OP
Ameglian cow
K

Joined: Dec 2002
Posts: 25
Vietnam
I'll give it a try to see what it will do. thx all