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.

join vs rejn

Old posts that have not been replied to for several years.
Locked
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

join vs rejn

Post by SaPrOuZy »

i asked this before and i got 2 different answers from whom i believe are 2 good scripters:
if i have bind join - * proc1
do nicks rejoining from a split activate proc1?
answer1:
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:
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: Select all

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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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

 tag when posting logs, code
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

Post by SaPrOuZy »

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?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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

 tag when posting logs, code
User avatar
Adrenalin
Voice
Posts: 21
Joined: Sat Jan 29, 2005 10:32 am
Location: Moldova
Contact:

Post by Adrenalin »

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)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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

 tag when posting logs, code
User avatar
SaPrOuZy
Halfop
Posts: 75
Joined: Wed Mar 24, 2004 7:38 am
Location: Lebanon

Post by SaPrOuZy »

[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...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

SaPrOuZy wrote:
[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: Select all

 tag when posting logs, code
User avatar
Adrenalin
Voice
Posts: 21
Joined: Sat Jan 29, 2005 10:32 am
Location: Moldova
Contact:

Post by Adrenalin »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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

 tag when posting logs, code
Locked