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.

Hostmask

Old posts that have not been replied to for several years.
Locked
C
CaliMonk

Post by CaliMonk »

Ok, i need my eggdrop to ban other then *!*ident@*isp.com, i tried and i tried but i cannot find another way of banning someone, getchanhost just returns that.. i just don't know how to do it diffrent.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

This is what I use in my scripts:

Code: Select all

#############################
# Set the ban type here:    #
# 1 - *!*@host.domain       #
# 2 - *!user@host.domain    #
# 3 - nick!*@host.domain    #
# 4 - nick!user@host.domain #
# 5 - *!?user@*.host.domain #
#############################

set bantype_setting(bantype) "1"

proc bantype_maskban {nick uhost} {
  global bantype_setting
  switch -- $bantype_setting(bantype) {
    1 { set ban "*!*@[lindex [split $uhost @] 1]" }
    2 { set ban "*!$uhost" }
    3 { set ban "$nick!*@[lindex [split $uhost @] 1]" }
    4 { set ban "$nick!$uhost" }
    5 { set ban "[maskhost $uhost]" }
    default { set ban "*!*@[lindex [split $uhost @] 1]" }
  }
  return $ban
}
Call it with:

Code: Select all

  [bantype_maskban <nick> <user@host>]
Locked