Any help would be most appreciated.
Can anyone tell me what part of this code i need to change and to what in order for the bot to ban a nick and its ident only instead of the whole host ban that it is currently doing?
"bankick" {
if {![check:auth $nick $hand]} { return 0 }
if {![botisop $chan]} {
puthelp "NOTICE $nick :$fzcom(logo): I'm not oped on $chan."
return 0
}
if {[lindex [split $arg] 1] == ""} {
puthelp "NOTICE $nick :$fzcom(logo): SYNTAX: $fzcom(trigger)bankick <nick1/ban1,nick2/ban1,..> \[reason\] \[bantime\]."
return 0
}
set knicks [split [lindex [split $arg] 1] ,]
if {[llength [lrange [split $arg] 2 end]] == 1} {
if {[string is integer [lindex [split $arg] end]]} {
set kreason "$fzcom(logo): Requested by $nick."
set btime "[lindex [split $arg] end]"
} else {
set kreason "$fzcom(logo): ($nick) [join [lrange [split $arg] 2 end]]"
set btime "$fzcom(btime)"
}
} elseif {[llength [lrange [split $arg] 2 end]] > 1} {
if {[string is integer [lindex [split $arg] end]]} {
set kreason "$fzcom(logo): ($nick) [join [lrange [split $arg] 2 end-1]]"
set btime "[lindex [split $arg] end]"
} else {
set kreason "$fzcom(logo): ($nick) [join [lrange [split $arg] 2 end]]"
set btime "$fzcom(btime)"
}
} else {
set kreason "$fzcom(logo): Requested by $nick."
set btime "$fzcom(btime)"
}
foreach knick $knicks {
if {[string match -nocase *!*@* $knick]} {
if {![string match -nocase $knick $botname]} {
foreach kuser [chanlist $chan] {
if {[string match -nocase $knick $kuser![getchanhost $kuser $chan]]} {
if {![matchattr [nick2hand $kuser] mo|mo $chan]} {
pushmode $chan +b $knick
putquick "KICK $chan $kuser :$kreason"
lappend thebanked($knick) $kuser
} {
puthelp "NOTICE $nick :$fzcom(logo): I will not bankick a master/owner ($kuser matching $knick)"
}
}
}
if {![info exists thebanked]} {
puthelp "NOTICE $nick :$fzcom(logo): There are no nicks matching $knick on $chan."
} {
if {[lsearch -exact [array names thebanked] $knick] == -1} {
puthelp "NOTICE $nick :$fzcom(logo): There are no nicks matching $knick on $chan."
}
}
flushmode $chan
} {
puthelp "NOTICE $nick :$fzcom(logo): Can't outsmart me, I will not bankick myself"
}
} {
if {[onchan $knick $chan]} {
if {![isbotnick $knick] && ![matchattr [nick2hand $knick] mo|mo $chan]} {
pushmode $chan +b "*!*@[scan [getchanhost $knick $chan] %*\[^@\]@%s]"
putquick "KICK $chan $knick :$kreason"
timer $btime [list pushmode $chan -b "*!*@[scan [getchanhost $knick $chan] %*\[^@\]@%s]"]
lappend bankicked $knick
} else {
puthelp "NOTICE $nick :$fzcom(logo): Can't outsmart me, no bankicking a master."
}
} else {
puthelp "NOTICE $nick :$fzcom(logo): $knick is not on $chan."
}
}
}
if {[info exists bankicked]} {
foreach wrbankicked [wordwrap [join $bankicked ,] 70 ,] {
puthelp "NOTICE $nick :$fzcom(logo): Bankicked $wrbankicked from $chan."
}
}
if {[array exists thebanked]} {
foreach banked [array names thebanked] {
foreach wrbanked [wordwrap [join $thebanked($banked) ,] 70 ,] {
puthelp "NOTICE $nick :$fzcom(logo): Bankicked $wrbanked matching $banked on $chan."
}
}
}
flushmode $chan
return 0
}