egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[SOLVED] AllProtection 4.9b4 banned kick issue.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
smolder
Voice


Joined: 06 Jul 2015
Posts: 11

PostPosted: Tue Mar 24, 2020 7:25 pm    Post subject: [SOLVED] AllProtection 4.9b4 banned kick issue. Reply with quote

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:
.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

Quote:
[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
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1095

PostPosted: Tue Mar 24, 2020 9:52 pm    Post subject: Re: AllProtection v4.b94 banned kick issue. Reply with quote

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?t=9721&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 !
Back to top
View user's profile Send private message
smolder
Voice


Joined: 06 Jul 2015
Posts: 11

PostPosted: Tue Mar 24, 2020 11:15 pm    Post subject: Re: AllProtection v4.b94 banned kick issue. Reply with quote

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. Smile
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1095

PostPosted: Tue Mar 24, 2020 11:50 pm    Post subject: Re: AllProtection v4.b94 banned kick issue. Reply with quote

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.
Sad

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 !
Back to top
View user's profile Send private message
smolder
Voice


Joined: 06 Jul 2015
Posts: 11

PostPosted: Thu Mar 26, 2020 6:29 am    Post subject: Re: AllProtection v4.b94 banned kick issue. Reply with quote

Already been there, done that but no luck. Sad
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 439

PostPosted: Thu Mar 26, 2020 2:04 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1095

PostPosted: Sat Mar 28, 2020 1:09 am    Post subject: Re: AllProtection v4.b94 banned kick issue. Reply with quote

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

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:

# 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. Smile
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 439

PostPosted: Sat Mar 28, 2020 10:37 am    Post subject: Reply with quote

tested it and that seems to fix the issue tnx willyw
Back to top
View user's profile Send private message
smolder
Voice


Joined: 06 Jul 2015
Posts: 11

PostPosted: Sat Mar 28, 2020 11:11 am    Post subject: Reply with quote

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:

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:

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. Very Happy

@ willyw:
Quote:
##[ ALL PROTECTION 4.9b4 ]#
(Is that a typo in your first post? )

Yes indeed it was typo, I have corrected it now. Smile

@ simo:
Quote:
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.
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1095

PostPosted: Sat Mar 28, 2020 12:02 pm    Post subject: Reply with quote

simo wrote:
tested it and that seems to fix the issue tnx willyw


It gets even better. Very Happy

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.
Smile
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber