Code: Select all
proc pub_+akick {nick uhost hand channel param} {
global botname botnick
set rest [lindex $param 0]
if {$rest == ""} {
puthelp "NOTICE $nick :Usage: +akick <nick/hostname>"
return 0
}
if {$rest == "*" || $rest == "*!*@*"} {
puthelp "NOTICE $nick :invalid hostname..!"
return 0
}
if {$rest == $botnick} {
puthelp "NOTICE $nick :DeNiEd..!"
return 0
}
if {[validuser $rest]} {
puthelp "NOTICE $nick :$rest is already on database with flags: [chattr $rest]"
return 0
}
if {![string match "*@*" $rest]} {
set rest "$rest!*@*"
}
if {[string match $rest $botname]} {
puthelp "NOTICE $nick :DeNiEd..!"
return 0
}
if {[finduser $rest] != "*"} {
if {[finduser $rest] != "AKICK"} {
puthelp "NOTICE $nick :That Host Belongs To [finduser $rest]"
}
puthelp "NOTICE $nick :That Host already in [finduser $rest]"
return 0
}
puthelp "NOTICE $nick :ADD \[$rest\] To KIcKLIsT..!"
utimer 1 [list setuser "AKICK" HOSTS $rest]
saveuser
foreach x [channels] {
if {[isop $botnick $x]} {
foreach c [chanlist $x K] {
if {![matchattr $c f]} {
akick_chk $c [getchanhost $c $x] $x
}
}
}
}
return 0
}
proc akick_chk {nick uhost chan} {
global bannick
foreach x [getuser "AKICK" HOSTS] {
if {[string match [string tolower $x] [string tolower "$nick!$uhost"]]} {
set bannick($nick) $x
putquick "KICK $chan $nick : Blacklist MaTcH FRoM $x]"
return 0
}
}
}
Here's the list in the cfgfile
Code: Select all
AKICK - K
--HOSTS telnet!*@*
--HOSTS *!*@91.102.*
--HOSTS *!*HeliX@110.*
--HOSTS [Windows!*@*
Please help with that code. Thankyou