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.

can anyone help with Spam Detective v1.0

Support & discussion of released scripts, and announcements of new releases.
Post Reply
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

can anyone help with Spam Detective v1.0

Post by drfox »

hi guys
if anyone can help
can this script be made to support multi channels please.

Code: Select all

##### 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"
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Try replacing:

Code: Select all

channel set $spamdet(monitor_chan) +inactive 
utimer $spamdet(gone_time) "channel set $spamdet(monitor_chan) -inactive"
with

Code: Select all

foreach chan [split $spamdet(monitor_chan)] {
 channel set $chan +inactive 
 utimer $spamdet(gone_time) [list channel set $chan -inactive]
}
Then you can use:

Code: Select all

set spamdet(monitor_chan) "#chan1 #chan2 #chan3"
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

Post by drfox »

thanx so much Sir_Fz thats worked great :D
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

Post by drfox »

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: Select all

##### 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"
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

Post by drfox »

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 :cry:
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You showed us from where the error came, but didn't show us the error message (the reason).
d
drfox
Voice
Posts: 26
Joined: Sun Oct 09, 2005 1:51 am

Post by drfox »

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)
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

you didnt replace/reload everything. it somehow executes the old proc with the new chanlist :D.
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...
User avatar
chandra Sha
Voice
Posts: 12
Joined: Tue Oct 31, 2006 1:27 am
Location: South Borneo

Spam Detective v1.0 bug

Post by chandra Sha »

It's work well except if you a spammer with nick with []. Example Spammer nick : [Chandra]
<[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
Botter is now known as ds{er3]
any can resolve this please?
Post Reply