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.
Old posts that have not been replied to for several years.
Bader
Voice
Posts: 35 Joined: Sat Mar 12, 2005 5:34 am
Post
by Bader » Mon Jul 18, 2005 4:42 pm
hi i try to make some script, for the opers
if there any users send msg spammrs for the bot, the bot copye
the nickname and the test of the msg, but doesn`t work good
pls i need help with it, and thanks
---
Code: Select all
set spambantime 30
bind msgm - "*" pv_kick
proc pv_kick {nick uhost hand text} {
global botnick spambantime
if {[regexp -nocase "/server" $text] || [regexp -nocase "http://" $text] ||
[regexp -nocase "www." $text] || [regexp -nocase "decode" $text] || [regexp -nocase "ftp://" $text] > 0} {
foreach kickchan [channels] {
if {![isop $nick $kickchan] || ![matchattr $hand o] || ![isvoice $nick $kickchan]} {
if {[onchan $nick $kickchan]} {
set bmask "*!*[string range $uhost [string first "@" $uhost] end]"
if {![ischanban $bmask $kickchan] || [botisop $kickchan]} {
putserv "privmsg #channelname :Spammer $nick ,Message: $text"
}
}
}
}
}
}
putlog "Spammers Send to channel opes tcl"
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Mon Jul 18, 2005 4:54 pm
for detecting spam you can use this:
Code: Select all
regexp {(?i)(http://|www\.|irc\.|[[:space:]]#)} $string
Bader
Voice
Posts: 35 Joined: Sat Mar 12, 2005 5:34 am
Post
by Bader » Mon Jul 18, 2005 5:01 pm
demond wrote: for detecting spam you can use this:
Code: Select all
regexp {(?i)(http://|www\.|irc\.|[[:space:]]#)} $string
--
like this
Code: Select all
set spambantime 30
bind msgm - "*" pv_kick
proc pv_kick {nick uhost hand text} {
global botnick spambantime
regexp {(?i)(http://|www\.|irc\.|/server)} $string
foreach kickchan [channels] {
if {![isop $nick $kickchan] || ![matchattr $hand o] || ![isvoice $nick $kickchan]} {
if {[onchan $nick $kickchan]} {
set bmask "*!*[string range $uhost [string first "@" $uhost] end]"
if {![ischanban $bmask $kickchan] || [botisop $kickchan]} {
putserv "privmsg #channelname :Spammer $nick ,Message: $text"
}
}
}
}
}
}
putlog "Spammers Send to channel opes tcl"
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Mon Jul 18, 2005 5:17 pm
i'd say, if regexp or this script will kick everybody no matter what i suppose
Bader
Voice
Posts: 35 Joined: Sat Mar 12, 2005 5:34 am
Post
by Bader » Mon Jul 18, 2005 5:25 pm
i mean if there any one send msg private by spam for website for server
the bot send him nick and hismsg
like: spam: nick Msg: welcome to
www.ww.com
-
the bot send him nick with him msg to some channel,
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Jul 18, 2005 6:19 pm
Bader wrote: i mean if there any one send msg private by spam for website for server
the bot send him nick and hismsg
like: spam: nick Msg: welcome to
www.ww.com
-
the bot send him nick with him msg to some channel,
Isn't that what the script is already doing?
putserv "privmsg #channelname :Spammer $nick ,Message: $text"
Anyway, this should do it:
Code: Select all
set spamrchan "#yourchan"
bind msgm - * relay:spam
proc relay:spam {nick uhost hand arg} {
if {[regexp {(?i)(http://|www\.|irc\.|[[:space:]]#)} $arg]} {
puthelp "PRIVMSG $::spamrchan :Spam by $nick with message: $arg"
}
}
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Wed Jul 20, 2005 3:35 am
Just remember also to "stripcodes" in $arg before matching also so it is easier and can catch more spammers using different techniques of spamming links and urls.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================