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 

mass-join-protection by SpiKe^^- Netsplits Problems.
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3579
Location: Mint Factory

PostPosted: Sat Feb 09, 2019 12:49 pm    Post subject: Reply with quote

Your issue was resolved?
_________________
I tawt I taw a puddy tat!
Back to top
View user's profile Send private message
F|irT
Voice


Joined: 30 Apr 2015
Posts: 30
Location: Pakistan

PostPosted: Sun Feb 10, 2019 7:47 pm    Post subject: Reply with quote

No Issue Resloved. still waiting for reply with good hands.

Caesar ,

Here u go With ur nick Spell Caerar .
Back to top
View user's profile Send private message Yahoo Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3579
Location: Mint Factory

PostPosted: Mon Feb 11, 2019 2:05 am    Post subject: Reply with quote

Are you sure you don't have that netsplit_detected variable used in some script? Tried unloading everything and leaving only this script to see if it's working or not?

Let's try with adding some debugging tools by replacing:
Code:

proc netsplit:unlock args {
   global netsplit_detected
   set netsplit_detected 0
}

with:
Code:

proc netsplit:unlock args {
   global netsplit_detected
   putlog "netsplit_detected was set to: $netsplit_detected"
   set netsplit_detected 0
   putlog "netsplit_detected is now set to: $netsplit_detected"
}

In theory you should see:
Code:

netsplit_detected was set to: 0
netsplit_detected is now set to: 1

_________________
I tawt I taw a puddy tat!
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 316

PostPosted: Mon Feb 11, 2019 10:49 am    Post subject: Reply with quote

tried the debug on my own testnet reproducing a netsplit with a bunch of local bots to join after and in all cases it still triggered the anti mass join and booted them even tho i reproduced a netsplit

Quote:

Quits :   Amigo   ~uid1234@Amigo.Premium.net (paradigm.hub.dal.net diamond.hub.dal.net)



i also checked PL and it didnt display the:

Quote:


netsplit_detected was set to: 0
netsplit_detected is now set to: 1

Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1025

PostPosted: Mon Feb 11, 2019 11:11 am    Post subject: Reply with quote

simo wrote:

i also checked PL and it didnt display the:

Quote:


netsplit_detected was set to: 0
netsplit_detected is now set to: 1



While you wait for caesar :

Do: .console and check your console flags to be sure you have plenty, so you can really see what is going on.

Then do: .tcl putlog "this is a test"
to be sure that you can see 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
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3579
Location: Mint Factory

PostPosted: Mon Feb 11, 2019 11:17 am    Post subject: Reply with quote

I'm an idiot. Try with this code:
Code:

set netsplit_detected 0

bind raw - QUIT netsplit:detect

proc netsplit:detect {from key arg} {
   global netsplit_detected
   if {[info exists netsplit_detected]} return
   set arg [string trimleft [stripcodes bcruag $arg] :]
   if {[string equal "Quit:" [string range $arg 0 4]]} return
   if {![regexp -- {^([[:alnum:][:punct:]]+)[[:space:]]([[:alnum:][:punct:]]+)$} $arg _arg s1 s2]} return
   if {[string match "*.dal.net" $s1] && [string match "*.dal.net" $s2]} {
      set netsplit_detected 1
     putlog "netsplit_detected was set to: $netsplit_detected"
      utimer 180 [list netsplit:unlock]
   }
}

proc netsplit:unlock args {
   global netsplit_detected
   set netsplit_detected 0
   putlog "netsplit_detected was set to: $netsplit_detected"
}

and "trigger" an net-split then wait and see if after 3 minutes is set back to 0.

Make sure you do a .restart as .rehash isn't very reliable apparently.

Edit: Fixed variable.
_________________
I tawt I taw a puddy tat!


Last edited by caesar on Fri Mar 08, 2019 2:25 am; edited 1 time in total
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 316

PostPosted: Mon Feb 11, 2019 4:59 pm    Post subject: Reply with quote

tried that and it gave me same result even after netsplit it kept detecting mass joins

also willyw for logs i have this in place

Quote:

mjkcobxs (msgs, joins, kicks/modes, cmds, misc, bots, files, server).
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1025

PostPosted: Mon Feb 11, 2019 5:03 pm    Post subject: Reply with quote

simo wrote:
...

also willyw for logs i have this in place

Quote:

mjkcobxs (msgs, joins, kicks/modes, cmds, misc, bots, files, server).


Quote:

Then do: .tcl putlog "this is a test"
to be sure that you can see it.



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

PostPosted: Tue Feb 12, 2019 8:13 am    Post subject: Reply with quote

Quote:

Then do: .tcl putlog "this is a test"
to be sure that you can see it.


oh forgot to mention i did that as well and worked i saw it in PL
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 316

PostPosted: Wed Feb 20, 2019 4:31 pm    Post subject: Reply with quote

i tested few times on testnet reproduced netsplit but after rejoins users still got kickbanned
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3579
Location: Mint Factory

PostPosted: Thu Feb 28, 2019 11:06 am    Post subject: Reply with quote

You don't see anything because of this line:
Code:

if {[info exists netsplit_detected]} return

because set netsplit_detected 0 is declared above.

Just noticed this as was trying to figure out why this is failing. /facepalm

I need a break from work lol
_________________
I tawt I taw a puddy tat!
Back to top
View user's profile Send private message
F|irT
Voice


Joined: 30 Apr 2015
Posts: 30
Location: Pakistan

PostPosted: Wed Mar 06, 2019 4:40 pm    Post subject: Reply with quote

Can any one give me fresh file after if it's slove the netsplit issue . i don't understand what to copy and where to paste thanks.
Back to top
View user's profile Send private message Yahoo Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3579
Location: Mint Factory

PostPosted: Thu Mar 07, 2019 2:40 am    Post subject: Reply with quote

Find that line in your code and remove it. It's THAT simple. Smile
_________________
I tawt I taw a puddy tat!
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 316

PostPosted: Thu Mar 07, 2019 3:59 pm    Post subject: Reply with quote

after taking out


if {[info exists netsplit_detected]} return


i initiated a netsplit on my testnet again and the results are still the same meaning even after a netsplit it detects rejoined users from netsplit as join flood and boots them out

also gettin error:

Tcl error [netsplit:detect]: can't read "text": no such variable
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 316

PostPosted: Thu Mar 07, 2019 4:26 pm    Post subject: Reply with quote

i changed the $text to $arg and that seemed to made it work

also since it kept setting channel lock modes i added the check for netsplit in join proces as well wich stopped that

nice work caesar tnx again
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 Requests All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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