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.

AllProtection.tcl (Stable: v4.8 / Beta: v4.9b4)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
s
sotengboy
Voice
Posts: 14
Joined: Sun Jan 03, 2010 3:43 am

deactife dontkickops

Post by sotengboy »

how to make bot deactife dont kick ops? so the bot can kick ops

thanks
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Re: deactife dontkickops

Post by willyw »

sotengboy wrote:... so the bot can kick ops
Start here, and read a few posts.
http://forum.egghelp.org/viewtopic.php?p=87383#87383

I hope that helps.
s
sotengboy
Voice
Posts: 14
Joined: Sun Jan 03, 2010 3:43 am

Re: deactife dontkickops

Post by sotengboy »

willyw wrote:
sotengboy wrote:... so the bot can kick ops
Start here, and read a few posts.
http://forum.egghelp.org/viewtopic.php?p=87383#87383

I hope that helps.
thank you for suggesting
L
Luminous
Op
Posts: 146
Joined: Fri Feb 12, 2010 1:00 pm

Post by Luminous »

How can I disable the ap:clones thing? I have it set to 0 0 v -1 in dcc, but it just igores it. :\

It kick bans people constantly when I want it to leave people alone.; server is capable of kicking people with excessive connections.

So, which proc is it, so I can just delete it?

For now, I'll just set it to 5000 clones, maybe that'll stop it... lol.
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Luminous wrote:How can I disable the ap:clones thing?
...
This one? :
ap:clones: {0 120 w 2}

That's copy n paste from .chaninfo on a bot of mine, and shows it is off.

Try:
.chanset #channel ap:clones 0 120 w 2
L
Luminous
Op
Posts: 146
Joined: Fri Feb 12, 2010 1:00 pm

Post by Luminous »

The initial "0" should be all that is required to turn it off. Or, perhaps, the +/- thing can be employed in that section, since it seems to work well for other things. Setting it to a setting higher than the server allows seems to work fine, so I'm going to leave it alone for now. :)
T
Torrevado
Op
Posts: 101
Joined: Wed Aug 02, 2006 6:29 pm

Post by Torrevado »

On "revolving door":

Would it be possible to send a private msg to users that have been banned?.

Thanks.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Luminous wrote:The initial "0" should be all that is required to turn it off. Or, perhaps, the +/- thing can be employed in that section, since it seems to work well for other things. Setting it to a setting higher than the server allows seems to work fine, so I'm going to leave it alone for now. :)
Yes, the first parameter (which is clones-number) should be set to 0 to turn the option off.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Torrevado wrote:On "revolving door":

Would it be possible to send a private msg to users that have been banned?.

Thanks.
Yes it's possible, a way to do it would be to add the following line

Code: Select all

puthelp "privmsg $nick :You've been banned from the channel for revolving-door offense."
after this line

Code: Select all

punish $pmeth [list $nick $uhost] $chan [mapr $revdoor(kmsg) "[expr {$ut-$gcj}] sec(s) revolution"] $revdoor(wmsg) $btype $btime $revdoor(klmsg) $revdoor(ktime) $revdoor(ktype) [string tolower $uhost]:revdoor
in the "revdoor" clause
R
Razor
Voice
Posts: 17
Joined: Thu Nov 19, 2009 5:49 am

Post by Razor »

I would like my SpamBot to identify to NickServ when it connect's to the IRC network.
I try'd adding putquick "PRIVMSG NickServ :Identify mypass" on several places in the code,
but no luck with that.

I'm using Eggdrop1.6.20 and AP4.6b9.

Would appreciate if someone could help me with it, thank you :-)


Code:

Code: Select all

set antispam(next) -1

set antispam(tip) ${my-ip}

set antispam(thost) ${my-hostname}



proc antispamcore {m h args} {

 variable antispam; variable Sec

 if {![info exists antispam(idx)] || ![valididx $antispam(idx)]} {

  if {[info exists antispam(idx)]} {unset antispam(idx)}

  if {[info exists antispam(cnick)]} {unset antispam(cnick)}

  foreach {s p} [split [lindex [lindex $::servers [expr {[incr antispam(next)]%[llength $::servers]}]] 0] :] {break}

  foreach c [channels] {

   if {[vcg $c ap:antispam] && [lindex [split [channel get $c ap:antispam]] 0] == "+"} {

    set ::my-ip $antispam(ip); set ::my-hostname $antispam(host)

    control [connect $s $p] [namespace current]::antispambot

    putlog "\002AP\002: AntiSpamBot: Connecting to $s:$p..."

    break

   }

  }

  return

 }

 set asbc 0

 foreach c [channels] {

  set mins [expr {[scan $m %d]+([scan $h %d]*60)}]

  foreach {off greet cycle idle} [split [channel get $c ap:antispam]] {break}

  if {$off == "+"} {incr asbc}

  if {[onchan $antispam(cnick) $c] && $off != "+"} {

   putdcc $antispam(idx) "part $c"

  } elseif {$cycle != 0 && $mins%$cycle == 0 && [onchan $antispam(cnick) $c]} {

   if {![info exists antispam([set e [string tolower $c]:idle])]} {set antispam($e) [unixtime]}

   if {[unixtime]-$antispam($e) < $idle*60 && [botisop $c]} {

    putlog "\002AP\002: AntiSpamBot: Cycling $c..."

    putdcc $antispam(idx) "part $c"

    putdcc $antispam(idx) "join $c"

   }

  } {if {![onchan $antispam(cnick) $c] && $off == "+"} {putdcc $antispam(idx) "join $c"}}

 }

 if {!$asbc} {

  putdcc $antispam(idx) quit

  putlog "\002AP\002: AntiSpamBot: Disconnected (disabled on all channels)..."

 }

}



proc antispambot {idx arg} {

 variable antispam; variable adv; variable greetexempts; variable antiSpamOnline

 if {${::my-ip} != $antispam(tip)} {set ::my-hostname $antispam(thost); set ::my-ip $antispam(tip)}

 if {$arg == ""} {

  if {[info exists antispam(idx)]} {unset antispam(idx)}

  if {[info exists antispam(cnick)]} {unset antispam(cnick)}

  if {[info exists antiSmapOnline]} {unset antiSpamOnline}

  if {[info exists antispam(qrsn)]} {set rsn $antispam(qrsn); unset antispam(qrsn)} {set rsn (dead)}

  putlog "\002AP\002: AntiSpamBot: Disconnected $rsn..."

  return

 }

 if {![info exists antispam(idx)] && ![info exists antispam(cnick)]} {

  set antispam(idx) $idx ; set antispam(cnick) $antispam(nick)

  putdcc $idx "user $antispam(user) 8 * :$antispam(realname)"

  putdcc $idx "nick $antispam(cnick)"

  return

 }

 if {![info exists antiSpamOnline]} {

  set antiSpamOnline 1

  if {[istimer [namespace current]::dumpqueues utimers]==""} {

   variable Sec -1

   utimer 1 [namespace current]::dumpqueues

  }

 }

 switch -- [string tolower [lindex [split $arg] 0]] {

  "ping" {putdcc $idx "pong [lindex [split $arg] 1]"}

  "error" {set antispam(qrsn) [join [lrange [split $arg] 4 end]]; return}

 }

 switch -- [set raw [string tolower [lindex [split $arg] 1]]] {

  "privmsg" - "notice" {

   set src [lindex [split $arg] 0]

   set asbn [lindex [split $arg] 2]

   if {![string equal -nocase $asbn $antispam(cnick)]} {return}

   if {[scan $src {:%[^!]!%s} nick uhost] != 2} {return}

   set text [join [lrange [split $arg] 3 end]]

   if {[set advword [isspam $text]] == ""} {

    if {$raw == "privmsg" && [string match ":\001DCC Send *\001" $text]} {set advword "DCC SEND"}

   }

   if {$advword == ""} {

    foreach {o s} [split $antispam(mprot) :] {break}

    if {[follow $s asbm $o 1 1] != -1} {return}

    set ism 0

    foreach t $antispam(t) {if {[string match -nocase $t $text]} {set ism 1; break}}

	set l $greetexempts(global)

    set f 0; foreach ge $l { if {[string match -nocase $ge $nick!$uhost]} {set f 1;break} }

    if {$ism && !$f} {asb:queue $nick [lindex $antispam(r) [rand [llength $antispam(r)]]]}

   }

  }

  "invite" {

   set src [lindex [split $arg] 0]

   if {[scan $src {:%[^!]!%s} nick uhost] != 2} {return}

   set advword "INVITE"

  }

  "001" {

   putlog "\002AP\002: AntiSpamBot: Connected and registered as $antispam(cnick)."

   set antispam(pong) 1; set antispam(idx) $idx

   foreach c [channels] {

    if {![vcg $c ap:antispam]} {continue}

    if {[lindex [split [channel get $c ap:antispam]] 0] == "+"} {

     putdcc $idx "join $c"

    }

   }

  }

  "433" {

   if {$antispam(cnick) == $antispam(nick)} {set antispam(cnick) $antispam(altnick)} {

    set antispam(cnick) [string replace $antispam(nick) end end [rand 10]]

   }

   putdcc $idx "nick $antispam(cnick)"

  }

  "nick" {

   if {[string trimleft [lindex [split [lindex [split $arg] 0] @] 0] :] == $antispam(cnick)} {

    set antispam(cnick) [string trimleft [lindex [split $arg] 2] :]

   }

  }   

  "join" {

   foreach {o s} [split $antispam(jprot) :] {break}

   set c [string trim [string tolower [string trimleft [lindex [split $arg] end] :]]]

   if {![validchan $c]} {return}

   foreach {off greet cy i} [split [channel get $c ap:antispam]] {break}

   if {[vcg $c ap:antispam] && $off == "+"} {

    if {[scan [lindex [split $arg] 0] {:%[^!]!%s} nick uhost] != 2} {return}

    if {[string equal -nocase $nick $antispam(cnick)] || [follow $s asbj:$c $o 1 1] != -1} {return}

    set antispam($c:idle) [unixtime]

    if {[info exists greetexempts($c)]} {set l $greetexempts($c)} {set l $greetexempts(global)}

    set f 0; foreach ge $l { if {[string match -nocase $ge $nick!$uhost]} {set f 1;break} }

    if {!$f && $greet == "+" && ![invalid:apc $nick [finduser $nick!$uhost] $c]} {

     asb:queue $nick [string map [list %nick $nick] $antispam(greet)]

    }

   }

  }

 }
\dev\null
User avatar
Anahel
Halfop
Posts: 48
Joined: Fri Jul 03, 2009 6:18 pm
Location: Dom!

Post by Anahel »

I try'd adding putquick "PRIVMSG NickServ :Identify mypass" on several places in the code,
^^ um, you need to add this in eggdrop.conf not in script

look here where to put it - http://forum.egghelp.org/viewtopic.php?p=58401#58401
R
Razor
Voice
Posts: 17
Joined: Thu Nov 19, 2009 5:49 am

Post by Razor »

Anahel wrote:
I try'd adding putquick "PRIVMSG NickServ :Identify mypass" on several places in the code,
^^ um, you need to add this in eggdrop.conf not in script

look here where to put it - http://forum.egghelp.org/viewtopic.php?p=58401#58401
Thank you. But, I was referring to the AllProtection AntSpam bot itself, and not my actual eggdrop bot (eggdrop.conf).
I think it needs an additional line of code (or something).
\dev\null
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

@Razor: It should work if you add the identification line in the "001" clause, try something like this

Code: Select all

"001" {
   putlog "\002AP\002: AntiSpamBot: Connected and registered as $antispam(cnick)."
   set antispam(pong) 1; set antispam(idx) $idx
   # Add the identification line here:
   putdcc $idx "privmsg nickserv :identify <password>"
   foreach c [channels] {
    if {![vcg $c ap:antispam]} {continue}
    if {[lindex [split [channel get $c ap:antispam]] 0] == "+"} {
     putdcc $idx "join $c"
    }
   }
  }
R
Razor
Voice
Posts: 17
Joined: Thu Nov 19, 2009 5:49 am

Post by Razor »

Sir_Fz wrote:@Razor: It should work if you add the identification line in the "001" clause, try something like this

Code: Select all

"001" {
   putlog "\002AP\002: AntiSpamBot: Connected and registered as $antispam(cnick)."
   set antispam(pong) 1; set antispam(idx) $idx
   # Add the identification line here:
   putdcc $idx "privmsg nickserv :identify <password>"
   foreach c [channels] {
    if {![vcg $c ap:antispam]} {continue}
    if {[lindex [split [channel get $c ap:antispam]] 0] == "+"} {
     putdcc $idx "join $c"
    }
   }
  }
Works like a charm! Thank you, Sir_Fz =)
\dev\null
User avatar
Domin
Halfop
Posts: 72
Joined: Sat Jun 10, 2006 9:10 am

Post by Domin »

Is there any way to exempt an ip/host from the clone scanning?
Since i got my users joining from a web frontend, they all join from same ip/host but with different idents, so i wouldt like to be able to exempt them from the clone scanner, while stille keeping it for the regulare users that joine via regulare clients.
Regards
Domin @ efnet
Post Reply