I was here looking arround, and I saw a anti advertise script - but the one I found have to many bad words, and counter and stuff, that is unusefull for me. ( sorry, but it gotta be simple)
I was wondering, if some of you have a anti advertise script, with only one function .. it's kick on a badword #
# binds #
bind ctcp * ACTION spam:action
bind pubm - {* *#*} spam:pub
# action spam #
proc spam:action {nick uhost hand dest keyword text} {
if {[lindex [split $dest "@"] 0] == $::botnick || [lindex [split $dest "@"] 1] != ""} { return }
if {[matchattr $hand of|fo $dest] || [isop $nick $dest] || ![string match "*#*" $text]} {
return
}
set mask "*!*@[lindex [split $uhost @] 1]"
newchanban $dest $mask Spam "\00224\002 hours ban for spaming within $dest" 1440
}
# channel spam #
proc spam:pub {nick uhost hand chan text} {
if {[matchattr $hand of|fo $chan] || [isop $nick $chan] || ![string match "*#*" $text]} {
set mask "*!*@[lindex [split $uhost @] 1]"
newchanban $chan $mask Spam "\00224\002 hours ban for spaming within $chan" 1440
}
}
Notice that I've made it to skip the channel op's (regular users with @ in there) and bot's known users, dosen't matter if he/she is oped, voiced or regular.
Once the game is over, the king and the pawn go back in the same box.
ppslim wrote:None by the looks of it.
1: The ident isn't the botnick
2: Eggdrop will never see messages from itself, as IRC server don't sned them.
Well...he's splitting the destination of the ctcp, not the userhost like you seem to base your reply on
The only time that 'if' containing the split would be 'true' is if the channel name contains a @ + one or more chars after it....and I don't see the point of that