View previous topic :: View next topic |
Author |
Message |
SaPrOuZy Halfop

Joined: 24 Mar 2004 Posts: 75 Location: Lebanon
|
Posted: Wed Sep 21, 2005 3:02 am Post subject: join vs rejn |
|
|
i asked this before and i got 2 different answers from whom i believe are 2 good scripters:
Quote: | if i have bind join - * proc1
do nicks rejoining from a split activate proc1?
|
answer1:
Quote: | Your proc1 will be activated whenever a user joins a channel. It doesn't have to be from a split, it can be a normal join as well. It will also trigger when the bot joins a channel itself.
by awyeah.
|
asnwer2:
Quote: |
no, [bind join] will not be triggered by rejoining from a split, so you can safely forget about that, it's not a problem
by demond
|
my script was messing up on split rejoins which makes the first answer more accurate, BUT it's not logical to have rejn and join triggered by the same event (someone rejoining from a split) which makes answer 2 more accurate.
i ended up adding the following INSIDE the proc bound to join
Code: |
bind rejn - * {
if {$halt_protection($zchan) == 1} { return 0}
putlog "\[SaP-PROT\] Channel $zchan returning from split - halting protection for 5 seconds."
set halt_protection($zchan) 1
utimer 5 {
putlog "\[SaP-PROT\] Protection re-initiated on $zchan."
set halt_protection($zchan) 0
}
return -code
}
|
is this a proper way to deal with the problem?
i created a new version of my script (join flood) that doesn't rely on timers , but on getchanjoin instead and i still didn't test it with the splits. i am afraid that the excess timers where causing the script to mess up, so i got rid of them. |
|
Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Sep 21, 2005 3:14 am Post subject: |
|
|
- don't bind rejn, it's irrelevant to your protection script (as irrelevant as awyeah's answer); bind join only
- bind join is not triggered by rejoining from a split, unless wait-split (see eggdrop.conf) has expired
- DO NOT embed inline code as parameter to [bind], use proc name
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
Back to top |
|
 |
SaPrOuZy Halfop

Joined: 24 Mar 2004 Posts: 75 Location: Lebanon
|
Posted: Wed Sep 21, 2005 3:38 am Post subject: |
|
|
yea i guess that's the most logical thing
i have wait-split set to 7200 which should be enough for most splits (hopefully)
anyways i'll be testing it for the next couple of days and see how it goes.
thanks dude.
btw, how do you guys usually test your join flood scripts? |
|
Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Sep 21, 2005 4:27 am Post subject: |
|
|
by commanding a dronenet to mass-join
I personally don't have one, but I wrote a vhost cloner to emulate it _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
Back to top |
|
 |
Adrenalin Voice

Joined: 29 Jan 2005 Posts: 21 Location: Moldova
|
Posted: Sun Oct 02, 2005 2:03 pm Post subject: |
|
|
It's a good idea to use
proc join {nick uhost hand chan} {
if {[info exists halt_protection($zchan)]} { return 0 }
}
proc splitjoin {nick uhost hand chan} {
..
set halt_protection($zchan) 1
utimer 5..set halt_protection($zchan) 0..
}
to check for netsplits..
On Undernet for example the rejoined user host from the net-split may differ from the initial net-split hosts, because of +x(user.undernet.org host instead of original, used to hide..) mode.
Example..
[19:59:25] * DYMA (~dyma@negariui.users.undernet.org) Quit (*.net *.split)
[20:07:10] * DYMA (~dyma@87.248.174.226) has joined #moldova
So if someone in the netsplit had same split-part host&split-rejoin host like this one:
[19:59:18] * D_I_M_C_A_17 (~dumy@216.99.16.117) Quit (*.net *.split)
[20:07:10] * D_I_M_C_A_17 (~dumy@216.99.16.117) has joined #moldova
You can save the situation with your sensible join flood protection script(like mine for example ;p) |
|
Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Oct 02, 2005 2:41 pm Post subject: |
|
|
splits have exactly one thing to do with mass join flood protection, and that thing is wait-split - nothing more, nothing less; [bind rejn] which supposedly triggers your [splitjoin] proc is irrelevant
and changing unet host by issuing umode +x has hardly anything to do with mass join flood protection as well; it's neither automatic, nor done on rejoin _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
Back to top |
|
 |
SaPrOuZy Halfop

Joined: 24 Mar 2004 Posts: 75 Location: Lebanon
|
Posted: Sun Oct 02, 2005 2:46 pm Post subject: |
|
|
Quote: | [bind rejn] which supposedly triggers your [splitjoin] proc is irrelevant
|
the only thing that this could be good for is the case of pple joining on a server not visible by the bot during the split (which is discussed in another post) i already did it this way but didn't test it yet, no splits... |
|
Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Oct 02, 2005 3:06 pm Post subject: |
|
|
SaPrOuZy wrote: | Quote: | [bind rejn] which supposedly triggers your [splitjoin] proc is irrelevant
|
the only thing that this could be good for is the case of pple joining on a server not visible by the bot during the split (which is discussed in another post) i already did it this way but didn't test it yet, no splits... |
that's [bind join] _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
Back to top |
|
 |
Adrenalin Voice

Joined: 29 Jan 2005 Posts: 21 Location: Moldova
|
Posted: Sun Oct 02, 2005 3:22 pm Post subject: |
|
|
The ideea is what in splits the masking host(+x) can be loosed,
instead of join user!ident@balblabla.user.undernet.org
join user!ident@real.ip
and instead of "bind rejn", "bind join" are triggered
And if between the splited users was someone with user!ident@real.ip.. We can prevent false flood protection alarm |
|
Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Oct 02, 2005 4:01 pm Post subject: |
|
|
hmm I'm not too sure what you're trying to say, but I'd guess you mean there's a possibility that unet hostmasking will be gone if there's no uworld (or whatever their system-wide services are called) on the split - I'm not sure if that actually happens though
so how do you do that? I mean recognizing that scenario
post your script _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
Back to top |
|
 |
|