Code: Select all
[19:22] Tcl error [pv_kick2]: invalid command name "# join channel klik www pussy http"
Code: Select all
#Antispam With cycle command
# -> bantime
set bantime 30
# -> banned words
set bannedwords "# join channel klik www pussy http"
# -> minutes bot should cycle channels
set timecycle 1
# SCRIPT BEGINS
bind msgm - "*" pv_kick2
# kick
proc pv_kick2 {nick uhost hand text} {
foreach bword [split $bannedwords]
foreach word [split $text] {
if {[string match -nocase [string tolower $bword] [string tolower $word]]} {
set banthisguy 1 ; break ; break
}
}
}
if {[info exists banthisguy]} {
foreach pvchan2 [channels] {
if {![isop $nick $pvchan2] && ![isvoice $nick $pvchan2] && [onchan $nick $pvchan2]} {
set pvmask2 "*!*$uhost"
if {![ischanban $pvmask2 $pvchan2]} {
set pvkickmsg2 "\002Msg Spam 30min. Ban!"
newchanban $pvchan2 $pvmask "Anti-Spam" $::pvkickmsg2 "%0d0h30m"
}
}
}
}
}
# cycle
timer $timecycle part_chan
proc part_chan {} {
global timecycle
foreach chancycle [channels] {
putserv "PART $chancycle :\037Spam Check!\037"
}
timer $timecycle part_chan
}
# SCRIPT ENDS
Code: Select all
proc pv_kick2 {nick uhost hand text} {
foreach bword [split $::bannedwords] {
if {[string match -nocase "*$bword*" $text]} {
foreach pvchan2 [channels] {
if {[onchan $nick $pvchan2] && ![isop $nick $pvchan2] && ![isvoice $nick $pvchan2]} {
set pvmask2 "*!*$uhost"
if {![ischanban $pvmask2 $pvchan2]} {
newchanban $pvchan2 $pvmask "Anti-Spam" "\002Msg Spam 30min. Ban!" "%0d0h30m"
}
}
}
break
}
}
}
This is due to this line:asdd1 wrote:Code: Select all
[19:23] Tcl error in file 'eggdrop.conf': [19:23] invalid command name "}" while executing "}" (file "scripts/Advertise.TCL" line 37) invoked from within "source scripts/Advertise.TCL" (file "eggdrop.conf" line 117) [19:23] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
Code: Select all
foreach bword [split $bannedwords]
Code: Select all
foreach bword [split $::bannedwords] {
I'm using the speechles variant and it doesnt detect .nml375 wrote:asdd1: If you're using the piece of code posted by me, it's meant to replace the pv_kick2 in the script posted by speechles.
Regardless which you use, you'll need to set the variable bannedwords to a list of "badwords".
What you mean ?Regardless which you use, you'll need to set the variable bannedwords to a list of "badwords".
The change to using newchanban requires that you configured your bot to enforce bans on the channel(s) (.chanset #thechannel +enforcebans), and it will not kick or ban people identified as friends (or op if set +dontkickops) or masters/owners. Could you doublecheck these conditionals with your test bench?asdd1 wrote:Ok, fixed, but my spam isn't detected ;(
Hadn't seen your post 'bout "fixed but not detecting" when I replied. But basically, in the top of the script, there is a line saying set bannedwords "# join channel klik www pussy http". This line sets that variable to hold a set of words used to detect spam (badwords).asdd1 wrote:I'm using the speechles variant and it doesnt detect .nml375 wrote:asdd1: If you're using the piece of code posted by me, it's meant to replace the pv_kick2 in the script posted by speechles.
Regardless which you use, you'll need to set the variable bannedwords to a list of "badwords".
What you mean ?Regardless which you use, you'll need to set the variable bannedwords to a list of "badwords".
Oki, could you see if your test client shows up when you do .bans ?asdd1 wrote:<05.07 19:50:47> <gather-lv> [19:50] #janis# chanset #Botnet +enforcebansnml375 wrote:The change to using newchanban requires that you configured your bot to enforce bans on the channel(s) (.chanset #thechannel +enforcebans), and it will not kick or ban people identified as friends (or op if set +dontkickops) or masters/owners. Could you doublecheck these conditionals with your test bench?asdd1 wrote:Ok, fixed, but my spam isn't detected ;(
<05.07 19:51:01> <gather-lv> [19:51] gather-lv joined #botnet.
<05.07 19:51:01> <gather-lv> [19:51] #botnet: mode change '+o gather-lv' by ChanServ!service@services.irc.lv
No result. I have different IPs.