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
}
Code: Select all
  [bantype_maskban <nick> <user@host>]