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.

[SOLVED] AllProtection 4.9b4 banned kick issue.

Support & discussion of released scripts, and announcements of new releases.
Post Reply
s
smolder
Voice
Posts: 11
Joined: Mon Jul 06, 2015 7:42 pm

[SOLVED] AllProtection 4.9b4 banned kick issue.

Post by smolder »

I am using eggdrop 1.8.4 with AllProtection 4.9b4 and having a punishment method issue.

I have enabled the Caps lock protection.

Code: Select all

.chanset #mychannel ap:caps 25:10 10 w:bk 2
The punishment method is set to: w:bk

But when caps lock protection triggered my bot acts as w:kb
[03:35] (Test-user) THIS IS CAPS LOCK PROTECTION TEST 1.
[03:35] (My-Bot) Warning: turn off your caps lock or you will be banned.
[03:35] (Test-user) THIS IS CAPS LOCK PROTECTION TES 2..
[03:35] ** Test-user has been kicked by My-Bot ( turn your caps lock off please. Banned 10 minutes - Kick -11- )
[03:35] ** My-Bot sets mode(s) +b *!*@12.34.56.789
The bot is doing opposite, it kicked the user first and then banned.
How to fix this so the bot ban first and then kick.
Am I missing something here?
P.S: I am having same issue for every protection I have enabled in AllProtection.
TIA.
Last edited by smolder on Sat Mar 28, 2020 11:12 am, edited 2 times in total.
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Re: AllProtection v4.b94 banned kick issue.

Post by willyw »

smolder wrote:I am using eggdrop 1.8.4 with AllProtection v4.b94
...
I just want to be sure that you know that there is a long thread just for AP, found here:
http://forum.egghelp.org/viewtopic.php? ... start=1335

and the author makes posts in it.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
s
smolder
Voice
Posts: 11
Joined: Mon Jul 06, 2015 7:42 pm

Re: AllProtection v4.b94 banned kick issue.

Post by smolder »

Yes, I have read few pages of this thread but haven't found the solution.
Also, m4s have posted the same question on Jul 01, 2017 on same thread (Page 90) but haven't got the response.
Seems like I must read all 90 pages of this thread.
Wish me good luck. :)
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Re: AllProtection v4.b94 banned kick issue.

Post by willyw »

Oh my !

No, I didn't mean it that way. I just wanted to be sure that you knew the thread was there.

I hadn't checked, and didn't realize that the question had been asked there, and not answered.
:(

I wonder if the forum's Search could help you? You might want to mess around with it some.

If you determine that the question has never been answered, look in that thread for links to the author's website. Maybe on it you will find contact info for him. ... Just a thought...

Best of luck with it.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
s
smolder
Voice
Posts: 11
Joined: Mon Jul 06, 2015 7:42 pm

Re: AllProtection v4.b94 banned kick issue.

Post by smolder »

Already been there, done that but no luck. :(
s
simo
Revered One
Posts: 1108
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

i believe thats because pushmode is used for setting bans wich has a built in delay in eggddrop that might explain why it always executes kicks first
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Re: AllProtection v4.b94 banned kick issue.

Post by willyw »

You caused me to go find mine and mess with it. :)

Mine does ban first, then kick. Then I realized it is an older version that does not have bk as an option.

So, I went and got
##[ ALL PROTECTION 4.9b4 ]#
(Is that a typo in your first post? )
and looked at it some.

To my eye, in the code, it looks like they are backwards. That kb will ban first, then kick - and bk will kick first, then ban.

First experiments - they both kicked first, then banned. Just what you said.

So I stared at the code a while longer, and finally spotted something. It was right in the config !

Find this:

Code: Select all

# Do you want your bot to queue bans? set here the time in seconds before dumping bans:
# NOTE: 0 means the bot will set the ban immediately
# The modes-per-line setting in eggdrop.conf is the number of modes allowed per command.
set apqueue(time) 1

and set it to zero.

Then experiment some more.
For me, that did it. It would ban, then kick.
And ! it still looks backwards to me in the code... but it's not. Put it on bk if you want it to ban first. You'll see... experiment with both.

I hope this helps. :)
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
s
simo
Revered One
Posts: 1108
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

tested it and that seems to fix the issue tnx willyw
s
smolder
Voice
Posts: 11
Joined: Mon Jul 06, 2015 7:42 pm

Post by smolder »

I was bit busy IRL so couldn't get a chance to reply.
Anyway, yesterday I was looking the code and noticed something.
( from line# 2450 to 2462)

Code: Select all

proc kb {nl c km bty bti klm kty kti wm} {
    set cc 0
    foreach {jn ju} $nl {
        _b $jn $ju $c $km $bty $bti arb [_k $jn $c $km $bti]
    }
}

proc bk {nl c km bty bti klm kty kti wm} {
    set cc 0
    foreach {jn ju} $nl {
        _k $jn $c $km $bti [_b $jn $ju $c $km $bty $bti arb]
    }
}
So I just simply changed the above code to:

Code: Select all

proc bk {nl c km bty bti klm kty kti wm} {
    set cc 0
    foreach {jn ju} $nl {
        _b $jn $ju $c $km $bty $bti arb [_k $jn $c $km $bti]
    }
}

proc kb {nl c km bty bti klm kty kti wm} {
    set cc 0
    foreach {jn ju} $nl {
        _k $jn $c $km $bti [_b $jn $ju $c $km $bty $bti arb]
    }
}
And it worked for me.

Then I also tried willyw's solution without changing the code and it also worked like a charm. :D

@ willyw:
##[ ALL PROTECTION 4.9b4 ]#
(Is that a typo in your first post? )
Yes indeed it was typo, I have corrected it now. :)

@ simo:
i believe thats because pushmode is used for setting bans wich has a built in delay in eggddrop that might explain why it always executes kicks first
I haven't checked the whole code but it seems like the script used putquick for bans and pushmode is used for unbans.

Thank you willyw & simo for replying and for your time.
Stay save guys.
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

simo wrote:tested it and that seems to fix the issue tnx willyw
It gets even better. :D

While searching here, I found where I had discussed something to do with this setting, with Sir_Fz ... and had completely forgotten it !

That was only back in 2009 ... so eleven years... I don't feel too dumb for forgetting it. heheeheheheh

smolder:
Glad to know that you got it going to suit you.
Thanks for letting us know, and what you did.
:)
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Post Reply