| View previous topic :: View next topic |
| Author |
Message |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Thu Oct 13, 2005 2:40 pm Post subject: can anyone help with Spam Detective v1.0 |
|
|
hi guys
if anyone can help
can this script be made to support multi channels please.
| Code: | ##### 23.08.03
# Spam Detective v1.0 by MarlbMan
# irc.newnet.net #complete-chat
#####
#####
#####
# Detects on join/on part spam in one channel, and alerts in another channel.
#####
#####
# Credits: I got the idea from Torr/MC_8's Spam Check. I wanted a script that would
# join/part a channel at specified intervals, but instead of kicking/banning
# I wanted it to alert the ops in another channel. This is my 5th script, but
# the first I've made public. Critism is welcome. I will be releasing a few
# more very soon.
#####
#####
# Settings:
#####
# Which channel shall we monitor for spam?
set spamdet(monitor_chan) "#den"
# Which channel shall we posts alerts in?
set spamdet(alert_chan) "#ops"
# How many minutes shall we idle in channel?
set spamdet(idle_time) "1"
# How many seconds shall we stay gone?
set spamdet(gone_time) "20"
# Exempt by nick (seperate by ,)
set spamdet(nexempt) "ChanServ, MarlbMan, nicksev"
# Exempt by host (seperate by ,)
set spamdet(hexempt) "cwbot@64.124.16.33"
# CTCP Keys to ignore (should always include action to prevent actions being reported)
set spamdet(kexempt) "ACTION"
#####
# Code (If you edit below this line you will hemmorage uncontrollably from your rectum)
#####
set spamdet(ver) "1.0"
if {![string match *spamdetect* [timers]]} {timer $spamdet(idle_time) spamdetect}
proc spamdetect {} {
global spamdet botnick
channel set $spamdet(monitor_chan) +inactive
utimer $spamdet(gone_time) "channel set $spamdet(monitor_chan) -inactive"
if {![string match *spamdetect* [timers]]} {timer $spamdet(idle_time) spamdetect}
}
spamdetect
proc EchoMESG { nick uhost handle args } {
global spamdet
if {![string match *$nick* $spamdet(nexempt)]} {
if {![string match *$uhost* $spamdet(hexempt)]} {
putserv "PRIVMSG $spamdet(alert_chan) :4ALERT! Possible Spam Detected From 3$nick"
putserv "PRIVMSG $spamdet(alert_chan) :Delivery Form: MESG"
putserv "PRIVMSG $spamdet(alert_chan) :<$nick!$uhost> $args"
}
}
}
proc EchoNOTC { nick uhost handle args target } {
global spamdet
if {![string match *$nick* $spamdet(nexempt)]} {
if {![string match *$uhost* $spamdet(hexempt)]} {
putserv "PRIVMSG $spamdet(alert_chan) :4ALERT! Possible Spam Detected From 3$nick"
putserv "PRIVMSG $spamdet(alert_chan) :Delivery Form: NOTC"
putserv "PRIVMSG $spamdet(alert_chan) :<$nick!$uhost> $args"
}
}
}
proc EchoCTCP { nick uhost handle target key args } {
global spamdet
if {![string match *$nick* $spamdet(nexempt)]} {
if {![string match *$uhost* $spamdet(hexempt)]} {
if {![string match *$key* $spamdet(kexempt)]} {
putserv "PRIVMSG $spamdet(alert_chan) :4ALERT! Possible Spam Detected From 3$nick"
putserv "PRIVMSG $spamdet(alert_chan) :Delivery Form: CTCP"
putserv "PRIVMSG $spamdet(alert_chan) :<$nick!$uhost> $key $args"
}
}
}
}
bind ctcp -|- * EchoCTCP
bind notc -|- * EchoNOTC
bind msgm -|- * EchoMESG
putlog "Spam Detective v1.0 by MarlbMan loaded" |
|
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Oct 13, 2005 5:21 pm Post subject: |
|
|
Try replacing:
| Code: | channel set $spamdet(monitor_chan) +inactive
utimer $spamdet(gone_time) "channel set $spamdet(monitor_chan) -inactive" |
with
| Code: | foreach chan [split $spamdet(monitor_chan)] {
channel set $chan +inactive
utimer $spamdet(gone_time) [list channel set $chan -inactive]
} |
Then you can use:
| Code: | | set spamdet(monitor_chan) "#chan1 #chan2 #chan3" |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Thu Oct 13, 2005 6:18 pm Post subject: |
|
|
thanx so much Sir_Fz thats worked great  |
|
| Back to top |
|
 |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Thu Oct 13, 2005 7:02 pm Post subject: |
|
|
um........ ok thought it worked but it dont when i try to restart it i get
"proc spamdetect {} {
global spamdet botnick
foreach chan [split $spamdet(monitor_chan)] {
channel set $chan +inactive
utimer $spamdet(gone_time) [..."
(file "scripts/spamdet.tcl" line 41)
invoked from within
"source scripts/spamdet.tcl"
(file "terminator.conf" line 1336)
[09:02] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
| Code: | ##### 23.08.03
# Spam Detective v1.0 by MarlbMan
# irc.newnet.net #complete-chat
#####
#####
#####
# Detects on join/on part spam in one channel, and alerts in another channel.
#####
#####
# Credits: I got the idea from Torr/MC_8's Spam Check. I wanted a script that would
# join/part a channel at specified intervals, but instead of kicking/banning
# I wanted it to alert the ops in another channel. This is my 5th script, but
# the first I've made public. Critism is welcome. I will be releasing a few
# more very soon.
#####
#####
# Settings:
#####
# Which channel shall we monitor for spam?
set spamdet(monitor_chan) "#doc #triv"
# Which channel shall we posts alerts in?
set spamdet(alert_chan) "#ops"
# How many minutes shall we idle in channel?
set spamdet(idle_time) "3"
# How many seconds shall we stay gone?
set spamdet(gone_time) "60"
# Exempt by nick (seperate by ,)
set spamdet(nexempt) "ChanServ, MarlbMan, nickserv, Dr-Fox"
# Exempt by host (seperate by ,)
set spamdet(hexempt) "cwbot@64.124.16.33"
# CTCP Keys to ignore (should always include action to prevent actions being reported)
set spamdet(kexempt) "ACTION"
#####
# Code (If you edit below this line you will hemmorage uncontrollably from your rectum)
#####
set spamdet(ver) "1.0"
if {![string match *spamdetect* [timers]]} {timer $spamdet(idle_time) spamdetect}
proc spamdetect {} {
global spamdet botnick
foreach chan [split $spamdet(monitor_chan)] {
channel set $chan +inactive
utimer $spamdet(gone_time) [list channel set $chan -inactive]
}
if {![string match *spamdetect* [timers]]} {timer $spamdet(idle_time) spamdetect}
}
spamdetect
proc EchoMESG { nick uhost handle args } {
global spamdet
if {![string match *$nick* $spamdet(nexempt)]} {
if {![string match *$uhost* $spamdet(hexempt)]} {
putserv "PRIVMSG $spamdet(alert_chan) :4ALERT! Possible Spam Detected From 3$nick"
putserv "PRIVMSG $spamdet(alert_chan) :Delivery Form: MESG"
putserv "PRIVMSG $spamdet(alert_chan) :<$nick!$uhost> $args"
}
}
}
proc EchoNOTC { nick uhost handle args target } {
global spamdet
if {![string match *$nick* $spamdet(nexempt)]} {
if {![string match *$uhost* $spamdet(hexempt)]} {
putserv "PRIVMSG $spamdet(alert_chan) :4ALERT! Possible Spam Detected From 3$nick"
putserv "PRIVMSG $spamdet(alert_chan) :Delivery Form: NOTC"
putserv "PRIVMSG $spamdet(alert_chan) :<$nick!$uhost> $args"
}
}
}
proc EchoCTCP { nick uhost handle target key args } {
global spamdet
if {![string match *$nick* $spamdet(nexempt)]} {
if {![string match *$uhost* $spamdet(hexempt)]} {
if {![string match *$key* $spamdet(kexempt)]} {
putserv "PRIVMSG $spamdet(alert_chan) :4ALERT! Possible Spam Detected From 3$nick"
putserv "PRIVMSG $spamdet(alert_chan) :Delivery Form: CTCP"
putserv "PRIVMSG $spamdet(alert_chan) :<$nick!$uhost> $key $args"
}
}
}
}
bind ctcp -|- * EchoCTCP
bind notc -|- * EchoNOTC
bind msgm -|- * EchoMESG
putlog "Spam Detective v1.0 by MarlbMan loaded" |
|
|
| Back to top |
|
 |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Thu Oct 13, 2005 7:31 pm Post subject: |
|
|
dont think its anything to do with what i changed because dose it with out the changes the only way i can get it going it to start the bot then add the script then rehash then add the changes and rehash again it wont let me start it with the script added i have to start the bot first  |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Oct 14, 2005 5:19 am Post subject: |
|
|
You showed us from where the error came, but didn't show us the error message (the reason). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
drfox Voice
Joined: 09 Oct 2005 Posts: 26
|
Posted: Fri Oct 14, 2005 1:20 pm Post subject: |
|
|
this is all it says after trying to load
[03:22] Tcl error in file 'sonic.conf':
[03:22] no such channel record
while executing
"channel set $spamdet(monitor_chan) +inactive "
(procedure "spamdetect" line 3)
invoked from within
"spamdetect "
(file "scripts/spamdet.tcl" line 47)
invoked from within
"source scripts/spamdet.tcl"
(file "sonic.conf" line 1337)
[03:22] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR) |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Oct 14, 2005 2:22 pm Post subject: |
|
|
you didnt replace/reload everything. it somehow executes the old proc with the new chanlist . _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
chandra Sha Voice

Joined: 31 Oct 2006 Posts: 12 Location: South Borneo
|
Posted: Thu Nov 02, 2006 6:35 am Post subject: Spam Detective v1.0 bug |
|
|
It's work well except if you a spammer with nick with []. Example Spammer nick : [Chandra]
| Quote: | | <[Chandra]> hei, Join #xxx |
The bot will not relay thet because his nick using [ ] or { } like all Flooder/spammer nick, they alway change nick with fast like
| Quote: | | Botter is now known as ds{er3] |
any can resolve this please? |
|
| Back to top |
|
 |
|