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.

need help with code - spam checker

Old posts that have not been replied to for several years.
Locked
User avatar
z_one
Master
Posts: 269
Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada

Post by z_one »

ok I have 2 bots. One is opped and the other is not.
I want the deopped bot to send spam info to the one that is opped so it can kick.
I wrote 2 files. One for the opped bot and one for the deopped. Can anyone tell me why the code is not working. Thanks guys

Opped Bot File:
bind bot * "report" nospamz

proc nospamz {frombotz commandz argz} {
set spnick [string tolower [lindex $argz 0]]
set spip [string tolower [lindex $argz 1]]
set sptype [string tolower [lindex $argz 2]]
set spreason [lrange $argz 3 end]

switch -exact $sptype {
inviting {
putquick "MODE #mychan +b $spip"
putkick #mychan $spnick $sptype $spreason
}
advertising {
putquick "MODE #mychan +b $spip"
putkick #mychan $spnick $sptype $spreason
}
default { return }
}
}

Deopped Bot File:
bind msgm - *#* nospamiz
bind msgm - */server* nospamiz
bind msgm - *http://* nospamaz
bind msgm - *www.* nospamaz
bind msgm - *.com* nospamaz
bind msgm - *.net* nospamaz
bind msgm - *.org* nospamaz

proc nospamiz { nick uhost hand text } {
global botnick

if {[string compare $nick $botnick] == 0 } { return 0 }

set ipban "*!*[string range $uhost [string first @ $uhost] e]"

foreach channel [channels] {
if {![validchan $channel]} { continue }
putallbots "report $nick $ipban inviting Inviting detected"
}

return 1
}


proc nospamaz { nick uhost hand text } {
global botnick

if {[string compare $nick $botnick] == 0 } { return 0 }

set ipban "*!*[string range $uhost [string first @ $uhost] e]"

foreach channel [channels] {
if {![validchan $channel]} { continue }
putallbots "report $nick $ipban advertising Advertising detected"
}

return 1
}
<font size=-1>[ This Message was edited by: z_one on 2002-05-13 04:32 ]</font>
Locked