Assuming that you want to put someone
as the value for the handle
variable, and that the reason
variable should hold Tachka, kakvo stava proshlqk? 0
set fh [open blacklist.txt r]
while {[gets $fh line] != -1} {
set reason [lassign [split $line] ip handle]
puts "handle = $handle"
puts "reason = [join $reason]"
}
close $fh
You have:
# Blacklist File:
set blackl(file) "scripts/blacklist.txt"
### CIDR
proc bl:cidr:ban {nick uhost hand chan} {
global botnick exempt_userflag
set fh [open blackl(file) r]
you need:
proc bl:cidr:ban {nick uhost hand chan} {
global botnick exempt_userflag blackl
set fh [open $blackl(file) r]
Given the updated requirement:
set line {*!*~*@217.21.146.130 someone Tachka, kakvo stava proshlqk? 0}
set rest [lassign [split $line] ip handle]
set reason [join [lrange $rest 0 end-1]]
set timeout [lindex $rest end]