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.

Looking for little script here.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
y
yD^
Voice
Posts: 14
Joined: Fri Aug 10, 2007 10:37 am

Looking for little script here.

Post by yD^ »

Hello,

this is the idea:

there is many of users useing the same ip from the same isp. so when my ops banned the user there is alot of users can't join the channel and the filter band will kick more than 1 user. so what am looking for is when the ops banned the isp range of user the bot will delete the ip from ban list and the bot banned the nick not the ip for example:

the range of isp is: 1- @78.89.*.* 2-@212.43.*.* .. etc

<op> sets mode: +b *!*@212.43.12.10
<Bot>sets mode: +b-bk nick!*@* *!*f@212.43.12.10 Protected.ISP

Hope it's clear and help many of users not only me..

My best regards.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

If there are many users on the same ip, how is the bot to know which nick to use in the nickban?
y
yD^
Voice
Posts: 14
Joined: Fri Aug 10, 2007 10:37 am

Post by yD^ »

Hello again.

Then what about just unaband the ip and sending notice to the op who banned the ip to banned the nick not the ip.
example:-

<op> sets mode: +b *!*@212.43.12.10
<Bot>sets mode: -bk *!*f@212.43.12.10 Protected.ISP
Then sending the notice to the op nick to banned the nick not the ip
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

yD^ wrote:Hello again.

Then what about just unaband the ip and sending notice to the op who banned the ip to banned the nick not the ip.
example:-

<op> sets mode: +b *!*@212.43.12.10
<Bot>sets mode: -bk *!*f@212.43.12.10 Protected.ISP
Then sending the notice to the op nick to banned the nick not the ip
Why not just set exempts for your users you wish to evade those global types of bans?
/mode +e nick!ident@host
Doesn't your network support exemptions? So for example, take below:
/mode +e *!*@78.89.*.*
/mode +e *!*@212.43.*.*
The problem with this, eggdrop might freak out and not realize why people can evade that ban. It will assume anarchy is reigning and it can't keep control, so will set +mi and try to kick everyone for massive join floods. But if set up properly, eggdrop will respect that exempt list. As a result, seeing the user rejoin after they kick/banned them, the op setting that ban will of course next ban the nickname, exactly as you desire.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Code: Select all

bind mode - "* -b*" check:ban
proc check:ban {nick uhost hand chan mode dest} {
  set bancount 0
  foreach user [chanlist $chan] {
    if {[string match $dest *![getchanhost $nick]]} {
      incr bancount
      if {$bancount > 1} { break }
    }
  }
  
  if {$bancount > 1} {
    putquick "MODE $chan -bk $dest PROTECTED.IP"
  }
}
.. untested ..

edit: yea, exemptions would be better, if you know the nicks/ips you want exempted... otherwise, exemptions won't work i guess...
y
yD^
Voice
Posts: 14
Joined: Fri Aug 10, 2007 10:37 am

Post by yD^ »

Thank you guys for your support,

but the +e won't let the op banned the nick or the ident and when you banned the nick or ident the user can join as he is not banned ever,
so if the bot unbanned the isp and sending notice the ops will banned the nick ,.
so i don't need the +e...

for the code above where i can put the ips ?
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

yD^ wrote:for the code above where i can put the ips ?
Huh? You don't. The script checks if the ban will affect 1 user, and in this case does nothing. Or if it will affect more than 1, will remove the ban, and then remove the channel key with your message. There is no need to tailor a thing.

Code: Select all

bind mode - "* +b*" check:ban
Might want to bind the mode to a +b (ban) rather than a -b (unban). :wink:
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

speechles wrote:

Code: Select all

bind mode - "* +b*" check:ban
Might want to bind the mode to a +b (ban) rather than a -b (unban). :wink:
Good catch ;x
Post Reply