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 

join vs rejn

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Wed Sep 21, 2005 3:02 am    Post subject: join vs rejn Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Sep 21, 2005 3:14 am    Post subject: Reply with quote


  • 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
View user's profile Send private message Visit poster's website
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Wed Sep 21, 2005 3:38 am    Post subject: Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Sep 21, 2005 4:27 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Adrenalin
Voice


Joined: 29 Jan 2005
Posts: 21
Location: Moldova

PostPosted: Sun Oct 02, 2005 2:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Oct 02, 2005 2:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Sun Oct 02, 2005 2:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Oct 02, 2005 3:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Adrenalin
Voice


Joined: 29 Jan 2005
Posts: 21
Location: Moldova

PostPosted: Sun Oct 02, 2005 3:22 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Oct 02, 2005 4:01 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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