#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