This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

invite/action tcl

Old posts that have not been replied to for several years.
Locked
n
n3v3r

Post by n3v3r »

Please i'm looking for a tcl for protect a channel from /invite and /me spam.I don't know why some tcl don't work on eggdrop 1.6.10 not for invite or action.Please somebody help me for a simple tcl. tnx. excuse me for bad english.
bye n3v3r
n
n3v3r

Post by n3v3r »

bind pubm - "*#kerouac*" banspam

}

proc banspam {nick uhost hand chan argv} {
global btime bkick


Now this tcl work on msg in the channel,but onli with normal msg,if I wont it work on ACTION,notice; whot can I do??Please help me tnx.
K
KID

Post by KID »

put this code in the some file of your banspam pubm proc

i think this works ... try it

bind ctcp - ACTION actionzban
proc actionzban {nick uhost hand chan key argv} {
banspam $nick $uhost $hand $chan $argv
}
n
n3v3r

Post by n3v3r »

tnx but not work :sad: I'm not a scripter i have take a nospam.tcl but more tcl antispam work only on public message,if you modify it please post in this forum,for me is important.
very tnx
n
n3v3r

Post by n3v3r »

this is a complete tcl


### ban time
set btime 30
### Reason kick
set bkick "Banned for $btime minuts for spam!!"

bind pubm - "*#some* banspam
bind pubm - "*join #*" banspam
bind pubm - "*www.*" banspam

bind pub o|o !unban unban

proc unban {nick uhost hand chan argv} {
if [killchanban $chan $argv]==0 {
putserv "NOTICE $nick :$argv isn't in my Spammer Ban List."
} else {
putserv "MODE $chan -b $argv"
}
}

proc banspam {nick uhost hand chan argv} {
global btime bkick

if [isop $nick $chan]==0 {
set banlamer $uhost
set why "No Spam"
set creator "Anti-Spam"
newchanban $chan $uhost $creator $why $btime
putserv "MODE $chan +b *!*$uhost"
putserv "KICK $chan $nick :$bkick"
dccbroadcast "nospam TCL: Banned $nick from $chan"
}

}
K
KID

Post by KID »

i've made this small tcl to u try it

Code ( any bug report it to me :smile: )
i think it works ... not guaranteed :smile:


# your chan(s) if chan > 1 => "#Chan1 #Chan2" ...
set chanz "your-chan"

# kickops ? [1=yes/0=no]
set kickops "0"

# kick voices ? [1=yes/0=no]
set kickvoices "0"

# no kick flags
set nokickflags "f|f"

# set ban time
set bantimez 30

# badwords list
set notallowed {
"*#*"
"*www*"
"*http://*"
}

# kick reason
set kickreason "no spam allowed here ... go play outside"


bind pubm - * pubm:notallowed
bind ctcp - ACTION ctcp:notallowed


proc pubm:notallowed {nick uhost hand chan arg} {
global botnick chanz bantimez notallowed kickreason
global kickops kickvoices nokickflags bantimez
if {(([lsearch -exact [string tolower $chanz] [string tolower $chan]] != -1) || ($chanz == "*")) && (![matchattr $hand b]) && ($nick != $botnick)} {
foreach bword [string tolower $notallowed] {
if {[string match $bword [string tolower $arg]]} {
if {!$kickops} {if {[isop $nick $chan]} {return 0}}
if {!$kickvoices} {if {[isvoice $nick $chan]} {return 0}}
if {([info exists nokickflags]) && ($nokickflags != "")} {
if {([lindex [split $nokickflags |] 1] == "")} {
if {[matchattr $hand $nokickflags]} {return 0}} {
if {[matchattr $hand $nokickflags $chan]} {return 0}}
}

set why "Spam"
set creator "noSpamz.tcl"
set banz "*!*$uhost"
newchanban $chan $banz $creator $why $bantimez
putquick "mode $chan +b $banz"
putquick "kick $chan $nick : $kickreason"
dccbroadcast "02noSpamz02: banned $nick from $chan"
}
}
}
}


proc ctcp:notallowed {nick uhost hand chan keyword arg} {
pubm:notallowed $nick $uhost $hand $chan $arg
}

putlog "noSpamz.tcl by KID @ IRC.PTnet.org - 02Loaded02"

n
n3v3r

Post by n3v3r »

tnx very much :smile: but....dont work :sad:
not work in public msg or clone ctcp spam..are my stupid eggdrop?with old tcl in public punish the spammer i dont undestand.this tcl is mi hell :smile:
K
KID

Post by KID »

humm weird it works for me, but i try it again in my bots .. and then i answer u
btw show me the errors :smile:

Locked