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.

Help for a tcl to relay spam to a channel of choice - thanks

Old posts that have not been replied to for several years.
Locked
T
Tashie
Voice
Posts: 2
Joined: Mon Jun 13, 2005 2:29 am

Help for a tcl to relay spam to a channel of choice - thanks

Post by Tashie »

I'm trying to find something that will relay spam messages to a channel of my choice. There seem to be alot of spam busting scripts out there that are a little more "high powered" than i'm actually requiring.

Basically i'd like a seperate file of particular strings of text that the script would look at, see if it's comparable to the spam msg, and if it is be able to relay it to a channel name that i can set.

So far i'm using a mIRC script to relay for me, which isn't as satisfactory as an eggdrop eg.

on *:TEXT:*/w*/w*/w*/*,*/K*/i*/r*/a*/z*,*/T*/k/*:?: { msg #channelname $fulladdress MSG $1- | echo -s $nick $address $1- | close -m $nick }

The strings of text are many and varied, the spammers try to hide their urls with colour codes and control characters.

The bot would be more of a floating bot, joining channels that i request it to monitor rather than a channel protection bot, plus it would be lovely to tell the bot to add a new string to the file on the fly.

I'm afraid i dont know much about coding this sort of script myself, it's rather out of my league but would be very grateful to anyone that has the time to either hash something together for me or point me in the right direction.

Cheers

Tashie - DALnet
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

This is very easy indeed. We can match triggers through a list -- using files is harder, as you have done in your mIRC coded remote.

For colors, we can strip the text and then go ahead and proceed analyzing it. I assume you are using eggdrop1.6.17, so you can use "stripcodes" to be of help -- tcl-commands.doc, else you will have to use a 'regsub' or 'string map' to filter out the codes. Search on the forum a filter by ppslim and you will get it.

Code: Select all

on *:TEXT:*/w*/w*/w*/*,*/K*/i*/r*/a*/z*,*/T*/k/*:?:{
#I am not sure how these triggers work, but anyway lets proceed

Code: Select all

#Set private message triggers here
set spamdetecttriggers {
"*/w*"
"*/K*"
"*/k*"
"*/i*"
"*/r*"
"*/a*"
"*/z*"
"*/T*"
"*/*"
}

#Set the channel to relay the spam message on
set spamrelaychan "#yourchannel"

#Set the trigger to make the bot join a channel
set spamchanaddtrigger "!add"

#Set the trigger to make the bot leave a channel
set spamchandeltrigger "!del"

###END OF SETTINGS###


bind msgm - "*" detect:spam
bind pub n $spamchandeltrigger del:chan
bind pub n $spamchanaddtrigger add:chan

proc detect:spam {nick uhost hand text} {
 global spamdetecttriggers
  foreach trigger $spamdetecttriggers {
   if {[string match $trigger [stripcodes bcruag $text]]} {
    break; report:spam $nick $uhost $text
    }
  }
} 

proc report:spam {nick uhost text} {
 global spamrelaychan
  if {[botonchan $spamrelaychan]} {
   putquick "PRIVMSG $spamrelaychan :$nick!$uhost MSG ($text)" -next
   }
}

proc add:chan {nick uhost hand chan text} {
 channel add [lindex [split $text] 0]
}

proc del:chan {nick uhost hand chan text} {
 if {[botonchan [lindex [split $text] 0]]} {
  channel remove [lindex [split $text] 0]
}
If you want complex matching, regular expression matching "regexp" can be also used, but for that I need some sample outputs for spam text messages you want to detect.

I released a script similar to a one you desire -- a year ago, it is more effective and utilizes 2 bots, they don't need to be also linked together. Here is the link you can download and give it a go:
http://www.egghelp.org/cgi-bin/tcl_arch ... oad&id=978
Last edited by awyeah on Mon Jun 20, 2005 3:23 am, edited 6 times in total.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you need spambuster
T
Tashie
Voice
Posts: 2
Joined: Mon Jun 13, 2005 2:29 am

Post by Tashie »

heh i looked at spambuster, that is way over what i need - it's got all the bells and whistles, but what i'm after is just something plain and simple ;)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Tashie wrote:heh i looked at spambuster, that is way over what i need - it's got all the bells and whistles, but what i'm after is just something plain and simple ;)
Yay! Someone else that believes in the KISS (Keep It Simple Stupid) principle.

* Alchera is happy
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Alchera wrote:
Tashie wrote:heh i looked at spambuster, that is way over what i need - it's got all the bells and whistles, but what i'm after is just something plain and simple ;)
Yay! Someone else that believes in the KISS (Keep It Simple Stupid) principle.

* Alchera is happy
well, once you bother to read through spambuster's configuration settings, you are supposed to figure out how to use it in KISS mode :P
Locked