The relay bot don't need to be an operator to continue the process. But the oppedbot yes.
Then, I completed the code with "if {([botonchan $nospamchan]) && ([onchan $oppedbot $nospamchan]) && (![isbotnick $nick])} { }".
I forgot to edit the pubm...
bind pubm - * pub:spam:check
proc pub:spam:check {nick uhost hand chan text} {
global spamwords oppedbot
if {[channel get $chan spamcheck]} {
foreach pattern $spamwords {
if {[string match -nocase $pattern $text]} {
if {([botonchan $nospamchan]) && ([onchan $oppedbot $nospamchan]) && (![isbotnick $nick])} {
if {(![validuser $hand]) && (![isop $nick $chan]) && (![isvoice $nick $chan])} {
putquick "PRIVMSG $oppedbot :spam $chan $nick"
}
}
}
}
}
return 0
}