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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Have stumbled across a "bug" regarding banned channels:

Code: Select all

SuperWoman ap:bchans: {+ 30 w:kb 3 10}

Code: Select all

SuperWoman [21:36] AP: Warned alexis21sxy_grl on #webchat :Warning: You're on a bad chan #realsex, leave it or you'll be kicked from #webchat. You have 0 seconds to leave #realsex.
Nothing happens except for that message every time the channel is scanned: In this case, every 10 minutes.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Alchera wrote:Have stumbled across a "bug" regarding banned channels:

Code: Select all

SuperWoman ap:bchans: {+ 30 w:kb 3 10}

Code: Select all

SuperWoman [21:36] AP: Warned alexis21sxy_grl on #webchat :Warning: You're on a bad chan #realsex, leave it or you'll be kicked from #webchat. You have 0 seconds to leave #realsex.
Nothing happens except for that message every time the channel is scanned: In this case, every 10 minutes.
You have apbchan(caw) set to 0, it needs to be greater than 0 and less than $pwait (60 seconds is a good setting).
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Woops. :lol:

I completely missed that setting below where I was looking.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
d
demon
Voice
Posts: 12
Joined: Thu Dec 14, 2006 4:43 pm

Post by demon »

havent used the xchannel tcl but if that works is the best thing i have ever seen in that kind of scripts! always to check for spam, onjoin msgs etc need a second bot for sure.. now life is better - thank you demond..

If there are idiots that use that feature for other perposes it is their fault.. that dont mean that we will not code any more..

Again thanks demond for that great idea!!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Ok, I've uploaded the new AllProtection4.6b6 with all reported bugs fixed. These bugs include:
  • Most protections not working due to a bug in the vcg proc
  • Settings being reset after restart due to a bug in the vcg proc
  • Channel specific (not global) lists weren't being saved to the aplists file
  • Aplogs date was saving current date instead of yesterdays date (for set logkbs(do) 2)
  • Other logical bugs which I probably forgot.
Enjoy, until the next release.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

The problem of adding a channel drone exempt and it not being saved to the file has reappeared.

I checked where the problem was first discovered but as that was fixed I cannot fathom what is causing it this time. :lol:
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I've fixed it and uploaded the script again; apparently we didn't really fix it last night :P
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

AllProtection4.6b7 released including the following changes:
  • Throttle sends to server. This prevents the bot from sending multiple identical commands at the same time to the server.
  • Bad words/ads are now also detected in notices, parts & quits.
  • Ability to choose CTCP requests for bad CTCP replies (previously only bad version).
  • Ability to ban thru X (or other services depending on network) when banlist is full.
  • Enhanced following offences technique.
  • Now all flood types have a punishment method (no exceptions anymore).
  • Added AntiSpamBot with ability to msg users on join and reply on certain private messages (configurable and include protection).
  • Several enhancements made over the code overall.
This is currently loaded on my bot, working 100% for me... Try it :)

Enjoy.

Edit: Updated link.
Last edited by Sir_Fz on Thu Feb 22, 2007 10:39 pm, edited 2 times in total.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

illegal channel option: ap:level

Post by Alchera »

Alchera .ap:reset #Ballarat
Ballarat [04:42] Tcl error [::AllProtection::cmd reset]: illegal channel option: ap:level
Ballarat illegal channel option: 75
I did a quick fix as I had the script loaded in a number of bots.
Add

Code: Select all

variable banthruX
... after ...

Code: Select all

proc cmd {cmd hand idx arg} {
Scroll down to the "reset" function and add this line

Code: Select all

if {[lindex $u 0] == "ap:level" && !$banthruX(do)} {continue}
... after ...

Code: Select all

foreach u ${ap:udefs} {
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Ok.. I have come across another 'bug'; I was unable to determine the cause of this.
Alchera .ap:disable #ballarat
Wendouree [05:25] Tcl error [::AllProtection::cmd disable]: Unknown channel setting.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Replace

Code: Select all

"disable" {
 set OZ {ap:repeatc ap:clones ap:echans}
 set NV {ap:adv ap:swear ap:bnicks ap:drones ap:bidents ap:bchans}
 set CC {ap:codes ap:partmsgc}
 foreach c $chans {
  if {[validchan $c]} {
   foreach u ${ap:udefs} {
    set rest [join [lrange [split [channel get $c [set ud [lindex $u 0]]]] 1 end]]
    if {[lsearch -exact $OZ [lindex $u 0]] != -1} {
     channel set $c $ud "0 $rest"
    } elseif {[lsearch -exact $NV $ud] != -1} {
     channel set $c $ud "- $rest"
    } elseif {[lsearch -exact $CC $ud] != -1} {
     channel set $c $ud "r:0 b:0 u:0 c:0 [join [lrange [split [channel get $c $ud]] 4 end]]"
    } elseif {$ud == "ap:limit"} { channel set $c $ud 0 } {
     channel set $c $ud "0:0 $rest"
    }
   }
   putdcc $idx "\002AP\002: Succesfully disabled all AP protections on $c."
  } { putdcc $idx "\002AP\002: $c is an invalid channel (not in my chanlist)." }
 }
}
with

Code: Select all

"disable" {
 set OZ {ap:repeatc ap:clones ap:echans}
 set NV {ap:adv ap:swear ap:bnicks ap:drones ap:bidents ap:bchans ap:bctcrs}
 set CC {ap:codes ap:partmsgc}
 foreach c $chans {
  if {[validchan $c]} {
   foreach u ${ap:udefs} {
    if {[set ud [lindex $u 0]] == "ap:level" && !$banthruX(do)} {continue}
    set rest [join [lrange [split [channel get $c $ud]] 1 end]]
    if {[lsearch -exact $OZ [lindex $u 0]] != -1} {
     channel set $c $ud "0 $rest"
    } elseif {[lsearch -exact $NV $ud] != -1} {
     channel set $c $ud "- $rest"
    } elseif {[lsearch -exact $CC $ud] != -1} {
     channel set $c $ud "r:0 b:0 u:0 c:0 [join [lrange [split [channel get $c $ud]] 4 end]]"
    } elseif {[regexp {ap:(limit|antispam)} $ud]} { channel set $c $ud 0 } {
     channel set $c $ud "0:0 $rest"
    }
   }
   putdcc $idx "\002AP\002: Succesfully disabled all AP protections on $c."
  } { putdcc $idx "\002AP\002: $c is an invalid channel (not in my chanlist)." }
 }
}
This of course should be done after applying the fixes suggested by Alchera above.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Alright, I have fixed the bugs reported for AllProtection4.6b7. Get the new file AllProtection4.6b7. these bugs include ap:reset and ap:disable commands causing error and the bad channel protection not working (now fixed).
Last edited by Sir_Fz on Thu Feb 22, 2007 10:39 pm, edited 1 time in total.
b
blacklines
Voice
Posts: 1
Joined: Mon Jan 08, 2007 5:10 am

Post by blacklines »

Can you add punishment methods akick?

putserv "ChanServ :akick $chan add $maskban $kickreason"
putserv "Chanserv :akick $chan enforce"
putserv "Chanserv :akick $chan del $maskban"
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Post by IRCNick »

Hi. I'm using allprotection4.6b7.tcl and I have this problem when I try to reset the ap settings to default

Code: Select all

[02:52] <me> .ap:reset #channel
[02:52] <bot> [02:51] Tcl error [::AllProtection::cmd reset]: illegal channel option: ap:level
[02:52] <bot> illegal channel option: 75
[02:52] <me> .set errorInfo
[02:52] <me> [02:51] #me# set errorInfo
[02:52] <bot> Currently: illegal channel option: ap:level
[02:52] <bot> Currently: illegal channel option: 75
[02:52] <bot> Currently: 
[02:52] <bot> Currently:     while executing
[02:52] <bot> Currently: "channel set $c [lindex $u 0] [lindex $u 1]"
[02:52] <bot> Currently:     ("foreach" body line 3)
[02:52] <bot> Currently:     invoked from within
[02:52] <bot> Currently: "foreach u ${ap:udefs} {
[02:52] <bot> Currently:   if {$u == "ap:level" && !$banthruX(do)} {continue}
[02:52] <bot> Currently:       channel set $c [lindex $u 0] [lindex $u 1]
[02:52] <bot> Currently:      }"
[02:52] <bot> Currently:     ("foreach" body line 3)
[02:52] <bot> Currently:     invoked from within
[02:52] <bot> Currently: "foreach c $chans {
[02:52] <bot> Currently:     if {[validchan $c]} {
[02:52] <bot> Currently:      foreach u ${ap:udefs} {
[02:52] <bot> Currently:   if {$u == "ap:level" && !$banthruX(do)} {continue}
[02:52] <bot> Currently:       channel set $c [..."
[02:52] <bot> Currently:     ("reset" arm line 2)
[02:52] <bot> Currently:     invoked from within
[02:52] <bot> Currently: "switch -- $cmd {
[02:52] <bot> Currently:   "add" {
[02:52] <bot> Currently:    if {$ti == 0} {
[02:52] <bot> Currently:     if {[validchan $c]} {
[02:52] <bot> Currently:      if {![info exists aptv($c)]} {
[02:52] <bot> Currently:       set aptv($c) $l
[02:52] <bot> Currently:   set unfound $l
[02:52] <bot> Currently:   ..."
[02:52] <bot> Currently:     (procedure "::AllProtection::cmd" line 33)
[02:52] <bot> Currently:     invoked from within
[02:52] <bot> Currently: "::AllProtection::cmd reset $_dcc1 $_dcc2 $_dcc3"
and

Code: Select all

[02:59] <me> .ap:disable #channel
[02:59] <bot> [02:58] Tcl error [::AllProtection::cmd disable]: Unknown channel setting.
and yes I'm using the newest version of the tcl from this post
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Download the newer (3rd of Jan) file above.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply