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.

mass-join-protection by SpiKe^^- Netsplits Problems.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Your issue was resolved?
Once the game is over, the king and the pawn go back in the same box.
F
F|irT
Voice
Posts: 30
Joined: Thu Apr 30, 2015 11:23 pm
Location: Pakistan

Post by F|irT »

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

Caesar ,

Here u go With ur nick Spell Caerar .
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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: Select all

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

Code: Select all

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: Select all

netsplit_detected was set to: 0
netsplit_detected is now set to: 1
Once the game is over, the king and the pawn go back in the same box.
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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
Quits :   Amigo   ~uid1234@Amigo.Premium.net (paradigm.hub.dal.net diamond.hub.dal.net)
i also checked PL and it didnt display the:

netsplit_detected was set to: 0
netsplit_detected is now set to: 1
w
willyw
Revered One
Posts: 1196
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

simo wrote: i also checked PL and it didnt display the:

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 !
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I'm an idiot. Try with this code:

Code: Select all

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.
Last edited by caesar on Fri Mar 08, 2019 2:25 am, edited 1 time in total.
Once the game is over, the king and the pawn go back in the same box.
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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
mjkcobxs (msgs, joins, kicks/modes, cmds, misc, bots, files, server).
w
willyw
Revered One
Posts: 1196
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

simo wrote:...

also willyw for logs i have this in place
mjkcobxs (msgs, joins, kicks/modes, cmds, misc, bots, files, server).
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 !
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

i tested few times on testnet reproduced netsplit but after rejoins users still got kickbanned
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

You don't see anything because of this line:

Code: Select all

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
Once the game is over, the king and the pawn go back in the same box.
F
F|irT
Voice
Posts: 30
Joined: Thu Apr 30, 2015 11:23 pm
Location: Pakistan

Post by F|irT »

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.
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Find that line in your code and remove it. It's THAT simple. :)
Once the game is over, the king and the pawn go back in the same box.
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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
Post Reply