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
F
FireWarrior
Voice
Posts: 19
Joined: Tue Oct 28, 2008 1:12 am

AllProtection v4.6b9 by Opposing - AntiSpamBot basic setting

Post by FireWarrior »

Hello Opposing,
Wow that was a lighting fast reply! In fact I was editing my post to add the information you brought out and you had already replied. Many thanks.
Yes I had already done the required settings and the bot still does not show.
Let me show you the settings again:
.chanset #MyChannel ap:antispam "- 10"
<Datum> Successfully set modes { ap:antispam { "- 10" } } on #MyChannel.
Datum is my eggdrop v1.6.19
Looking forward to your guidance, and many thanks again.
Regards.
F
FireWarrior
Voice
Posts: 19
Joined: Tue Oct 28, 2008 1:12 am

AllProtection v4.6b9 by Opposing - AntiSpamBot basic setting

Post by FireWarrior »

Hi again,
Just to be absolutely sure and true to the syntax I’ve redone the .chanset command and got a successful reply, but the bot is still not showing...
.chanset #MyChannel ap:antispam "- 10 0"
<Datum> Successfully set modes { ap:antispam { "- 10 0" } } on #MyChannel.
I’m a newbie so do excuse me for repeating the obvious, but according to my limited understanding, greet is off (-), cycle time is 10 mins and idle time is off (0 mins).
My apologies for the minor reply flood, I just wanted to appraise you of the latest situation. :)
Thanks again,
Regards.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You have two +/- switches in the setting, the first is for enabling/disabling the antispam bot and the second is for enabling/disabling greeting. So the correct setting you're looking for is:
.chanset #channel ap:antispam + - 10 0
Pay attention to the documentation in the script.
F
FireWarrior
Voice
Posts: 19
Joined: Tue Oct 28, 2008 1:12 am

Default settings after .restart

Post by FireWarrior »

Hello Opposing,
Many thanks for correcting my error. I apologise for not paying due attention.
Now for the follow up, the problem has gotten larger:
• The antispambot is still not showing and to add to that,
• After .restart the script goes back to the default settings, ignoring the strings that I put in.
Let me elaborate:
1. I did exactly as you said:

Code: Select all

<FireWarrior> .chanset #MyChannel ap:antispam "+ - 10 2"
<Datum> Successfully set modes { ap:antispam { "+ - 10 2" } } on #MyChannel.
2. The antispam bot did not show up. I waited for 10 mins and then restarted my eggdrop, just to be sure. The script loaded successfully, but I saw a line:

Code: Select all

<Datum> [18:05] No longer supporting channel #MyChannel
3. After which I did .chaninfo and observed that the script gone back to its default settings.

Code: Select all

<FireWarrior> .chaninfo #MyChannel
<Datum> Settings for dynamic channel #MyChannel:
<Datum> Protect modes (chanmode): +tn
<Datum> Idle Kick after (idle-kick): DON'T!
<Datum> stopnethack: DON'T!
<Datum> aop-delay: 5:30
<Datum> revenge-mode: 0
<Datum> ban-time: 120
<Datum> exempt-time: 60
<Datum> invite-time: 60
<Datum> Other modes:
<Datum>      -inactive       -statuslog      -secret         +shared
<Datum>      +greet          +seen           +cycle          +dontkickops
<Datum>      +protectops     +protectfriends -revenge        -revengebot
<Datum>      -bitch          -autoop         +autovoice      -nodesynch
<Datum>      -enforcebans    +dynamicbans    +userbans       -autohalfop
<Datum>      -protecthalfops
<Datum>      +dynamicexempts +userexempts    +dynamicinvites +userinvites
<Datum> User defined channel strings:
<Datum> ap:textl: {5:2 60 k:kb 2}
<Datum> ap:textc: {215:3 120 kb 2}
<Datum> ap:notcl: {1:3 120 kb 2}
<Datum> ap:notcc: {200:3 180 kb 2}
<Datum> ap:caps: {60:90 120 kb 2}
<Datum> ap:repeatl: {3:10 60 k:kb 2}
<Datum> ap:repeatc: {25 30 w:k:kb 2}
<Datum> ap:codes: {r:35 b:80 u:80 c:80 90 kb 2}
<Datum> ap:adv: {+ 180 kb 2}
<Datum> ap:antispam: {- + 10 10}
<Datum> ap:swear: {+ 120 kb 2}
<Datum> ap:pqsadv: {s:1 a:1}
<Datum> ap:ctcps: {2:30 180 kb 2}
<Datum> ap:massd: {5:1 30 kb 2}
<Datum> ap:massk: {8:2 30 kb 2}
<Datum> ap:massb: {18:2 30 kb 2}
<Datum> ap:limit: 0
<Datum> ap:cjoin: {3:2 120 kb 2}
<Datum> ap:partmsgs: {180 120 kb 2}
<Datum> ap:partmsgc: {r:35 b:35 u:35 c:35 30 kb 2}
<Datum> ap:revdoor: {3 120 kb 2}
<Datum> ap:nickf: {4:12 60 w:k:kb 2}
<Datum> ap:clones: {8 120 kb 2}
<Datum> ap:bnicks: {+ 120 kb 2}
<Datum> ap:drones: {+ 180 45 2}
<Datum> ap:bidents: {+ 120 kb 2}
<Datum> ap:bchans: {- 90 kb 2 0}
<Datum> ap:echans: {17 60 w:kb 2 0}
<Datum> ap:bctcrs: {- 120 kb 2 0}
<Datum> ap:ctcpchecks: {"VERSION"}
<Datum> ap:btextl: {15:7 mR-k lines.flood 60}
<Datum> ap:btextc: {550:3 mR-k chars.flood 60}
<Datum> ap:bnotcl: {4:2 mR-k lines.flood 60}
<Datum> ap:bnotcc: {500:3 mR-k chars.flood 60}
<Datum> ap:bctcp: {4:60 mR-k ctcp.flood 60}
<Datum> ap:massjoin: {9:3 mR-k join.flood 60}
<Datum> ap:brevdoor: {5:3 mR-k revdoor.flood 60}
<Datum> ap:bpartmsg: {5:3 mR-k partmsg.flood 60}
<Datum> ap:bnickf: {5:30 mR-k nick.flood 60}
<Datum> ap:bcodes: {25:3 mR-k codes.flood 60}
<Datum> flood settings: chan ctcp join kick deop nick
<Datum> number:           10    3    5    7    3    5
<Datum> time  :           60   60   60   10   10   60
<Datum> [18:08] #FireWarri# chaninfo #MyChannel
4. I will show just 5 of my .chanset entries for the sake of clarity. As you can see they were reset to default after .restart.

Code: Select all

.chanset #MyChannel ap:repeatc "0 0 v 2"
.chanset #MyChannel ap:codes "r:35 b:80 u:80 c:80 90 kb 2"
.chanset #MyChannel ap:adv "-  0 v 2"
.chanset #MyChannel ap:antispam "+ - 10 2"
.chanset #MyChannel ap:swear "-  0 v 2"
5. This happens even if I use .chanset *. The strings go back to their default settings after every .restart.

I invoke your help again Revered One and I thank you for your patience and effort in advance.
Regards.
Last edited by FireWarrior on Fri Feb 27, 2009 4:36 am, edited 1 time in total.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Your problem is not related to AllProtection but is rather an Eggdrop problem where for some unknown reason it's not properly saving the channel records. You can do a forum search about the issue... All I can suggest right now is that you try .chansave after altering a channel's records.
F
FireWarrior
Voice
Posts: 19
Joined: Tue Oct 28, 2008 1:12 am

Post by FireWarrior »

Thanks Opposing,
Your inputs are much appreciated.
Regards.
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Sir_Fz wrote:
willyw wrote:
Sir_Fz wrote:apqueue(time) is the time in seconds used for the queue timer. If it's set to 1 for example, the script will launch a timer which will queue bans and dump them every 1 second. So, suppose your bot issues 3 bans in 0.8 seconds before the proc is triggered, when the dump:queues procedure is triggered, the script will simultaneously set the three bans together (depending on your network that is). Now, in your situation, since you're going to use Eggdrop [newchanban] then you don't need AP's queue.
Just curious... but why was it needed at all?
This has been implemented to allow the eggdrop to queue as much bans as possible before dumping them to the server. It very much reduces the bot's possibility of flooding out in case of massive floods (where it would send to the server 10s of ban commands in seconds instead of stacking them in single commands).
And now, when using newchanban - is it a concern?
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Sir_Fz wrote: ....
When you have time, could you look at it again, and let us know if this is the correct order for "bt" and "kr"?
Yes, you are right, I accidentally flipped the order :) I edited my post now and corrected this "typo."
:) Excellent.
I hope others find it useful too.


Am continuing to experiment with this version of AP, with the modifications as you've described.
Started out using very little of its many functions. Have today tried Bad Nicks for the first time, and it is not working properly.
It will detect a bad nick and send a warning, but that is all. It is set to w:k:b.
About a minute after the warning is issued, this appears in console:
[05:35] Tcl error in script for 'timer1887':
[05:35] wrong # args: should be "::AllProtection::pubms flood nick uhost hand chan arg"


Immediately issued .set errorInfo , and got:

Currently: wrong # args: should be "::AllProtection::pubms flood nick uhost hand chan arg"
Currently: while executing
Currently: "::AllProtection::pubms bnicks <warned_nick_here> <warned nick hostmask here> * <#channame>"


Let me know if there is some other info you need from me, and I'll try to get it.

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

Post by Sir_Fz »

Damn, that's a serious mistake in the script. Thanks for reporting this. Apply the following changes to fix it:

Replace

Code: Select all

utimer $bnick(caw) [list ${nsc}::pubms bnicks $jn $ju [nick2hand $jn $c] $c]
with

Code: Select all

utimer $bnick(caw) [list ${nsc}::joins bnicks $jn $ju [nick2hand $jn $c] $c]
and

Code: Select all

utimer $bident(caw) [list ${nsc}::pubms bidents $jn $ju [nick2hand $jn $c] $c]
with

Code: Select all

utimer $bident(caw) [list ${nsc}::joins bidents $jn $ju [nick2hand $jn $c] $c]
Please let me know if this fixes the problem.

Edit:
willyw wrote:And now, when using newchanban - is it a concern?
No, because newchanban uses Eggdrop's built-in queues.
F
FireWarrior
Voice
Posts: 19
Joined: Tue Oct 28, 2008 1:12 am

Antispam bot- ALL PROTECTION 4.6b9 by Opposing

Post by FireWarrior »

Hello Opposing,
I’ve solved the issue regarding the saving of channel records, thanks for pointing it out to me.
The problem of the antispam bot not showing up still remains, so I still need your guidance and help on the matter.
Chaninfo shows the following information:

Code: Select all

ap:antispam: {"+ - 10 2"}
But the antispam bot does not show up.
I don’t know if the following information will be helpful but I’m giving it anyway. I’m a newbie so excuse me if I'm wrong.

1. Some excerpts from my eggdrop configuration file:

Code: Select all

##### BASIC SETTINGS #####
set username "fiery"
set my-hostname "fear.this.warri0r.org"
set my-ip "209.250.249.155"

#### SERVER MODULE ####
set nick "TestBot"
set altnick "PandaBear"
set realname "Just me :)"
2. Excerpts from ALL PROTECTION 4.6b9 script file (assuming the cycler is a forked clone):

Code: Select all

# AntiSpamBot basic settings
# You can edit all these settings as you wish
# example: set antispam(nick) AntiSpamBot
set antispam(nick) PandaBear
set antispam(altnick) PandaBear`
# Antispam ident & real name
set antispam(user) fiery
set antispam(realname) "Just me :)"
# example: set antispam(ip) 127.0.0.1
set antispam(ip) 209.250.249.155           
# example: set antispam(host) my.lame.vhost.net
set antispam(host) fear.this.warri0r.org  
3. Even after reading the documentation regarding the antispam bot it is not clear to me if:
• the antispam bot is a forked clone like in xchannel.tcl,
• or the antispam bot is a different eggdrop sitting in another shell.
After reading up a bit I think you have written the antispam bot to be a forked clone.

4. Do excuse my ignorance as I’m new to this, but I tried both the scenarios out, none of them worked for me.

5. Please note that I don’t get any error messages in any of the above cases.

You’ve been very helpful and patient, for that I’m very grateful. Hope I’m not bothering you too much.

Thanks again in advance,

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

Post by Sir_Fz »

Yes, it is a forked clone and not a different Eggdrop. It's weird that you're not getting anything, you should at least see a message in your Eggdrop's partyline saying "AP: AntiSpamBot: Connecting to <server>:<port>..." Note that the clone does not immediately connect when you enable the setting, the setting is checked every minute and if enabled on any channel the bot will immediately attempt to connect. Did you wait before confirming that nothing is happening? (check your Eggdorp's log file if necessary)
F
FireWarrior
Voice
Posts: 19
Joined: Tue Oct 28, 2008 1:12 am

Post by FireWarrior »

Thanks again Opposing.
I agree with you it is weird. AllProtection v4.6b9 has been installed and running in my bot for about 8 hours now, so yes I have waited.
I checked the bot logs as you suggested and I found no errors there. This makes everything more surprising. My log file settings are given below:

Code: Select all

##### LOG FILES #####
logfile mcobxs * "logs/TestBot.log"
Yet I found no errors…
I’m sure there is a solution, but I don’t know where to look.
I’m really grateful for the interest you’ve shown and I can’t thank you enough.
Regards.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

We'll have to debug the problem then because it seems to be working perfectly on my Eggdrop (perhaps someone else can confirm this). Try adding [putlog] lines in the antispamcore procedure for debuging. Something like this should be enough:

Code: Select all

proc antispamcore {m h args} {
 variable antispam; variable Sec
 # Indicate that the procedure is being called
 putlog "I am inside antispamcore!"
 if {![info exists antispam(idx)] || ![valididx $antispam(idx)]} {
  # Indicate that the antispam bot is not online
  putlog "The antispambot is currently not connected..."
  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}
  # Print out what server and port the antispam bot will connect to
  putlog "Server: $s - Port: $p"
  foreach c [channels] {
   # For every channel print the status of the if-statement
   putlog "Setting validation: [vcg $c ap:antispam] :: Setting: [lindex [split [channel get $c ap:antispam]] 0]"
   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
 }
 [snipet]...
Rehash after applying the above changes and monitor your bot's partyline where you might identify the problem.
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Sir_Fz wrote:Damn, that's a serious mistake in the script. Thanks for reporting this. Apply the following changes to fix it:
...
Please let me know if this fixes the problem.
Glad to report it. I hope it helps you, and others.
Thank you for the reply and help.

Have found the lines you described, under "w" in the punish procedure.
Made the changes.

Some brief testing, and it seems to be working now! :)

An interesting thing to report though - at first try it did not seem to work.
Instead of issuing a warning like it did before the edits, it did nothing.
What we did:
Copy-n-paste your new lines over the lines you directed us to.
.rehash
Tried changing nicks to a test word that we had already set up in in ap:list bnicks #chan
Nothing. Zilch. No reaction at all.

Edited it back to original, and got original reaction - warning and tcl error.
Wanted to carefully try again....
Again, copy-n-pasted in your lines.
But this time, did not .rehash.
.restart

Presto!
It began working.

I thought that edits were normaly handled all ok by a .rehash.
This time, it was not. I've no idea why.

Just thought that others might want to know to .restart.

Thank you for the reply and the edits. We will continue with it, and I'll let you know if anything goes awry.

I sense a new release coming, what with the things you've done just for me lately. :)
I hope you include a way to optionally use newchanban , amongst whatever else you include in a new ver.

Some time ago, you gave me edits so that we could include the "." period, and the "?" question mark in the repeatc protection.
Would you be able to make them optionally include-able in a new version too? I hope so.


Edit:
willyw wrote:And now, when using newchanban - is it a concern?
No, because newchanban uses Eggdrop's built-in queues.
Ok. I don't know the built in queues, but maybe I need to review the docs.


Thanks again. You help and your script are appreciated - daily.
F
FireWarrior
Voice
Posts: 19
Joined: Tue Oct 28, 2008 1:12 am

Antispam bot - debug information.

Post by FireWarrior »

Hello Opposing,
I did the debugging as you had suggested and here are the outputs from the partyline of my bot:

Code: Select all

<TestBot> [07:45] I am inside antispamcore!
<TestBot> [07:45] The antispambot is currently not connected...
<TestBot> [07:45] Server: arcor.de.eu.dal.net - Port: 7000
<TestBot> [07:45] Setting validation: 1 :: Setting: -
<TestBot> [07:45] Setting validation: 1 :: Setting: -
<TestBot> [07:46] I am inside antispamcore!
<TestBot> [07:46] The antispambot is currently not connected...
<TestBot> [07:46] Server: broadway.ny.us.dal.net - Port: 7000
<TestBot> [07:46] Setting validation: 1 :: Setting: -
<TestBot> [07:46] Setting validation: 1 :: Setting: -
This continues till the entire list of servers is exhausted, and then it starts all over.
I have a suspicion that it has something to do with idx…
Hope the debug information helps you.
Once again, many thanks and best of luck.
Regards
Post Reply