I am writing a code that read the file allowip.txt, if the hostname of chatters does not match with the ip addresses in allowip.txt, they will be klined , if their ip is matching with the ips in allowip.txt, they will be voiced in the room. and suppose that i am an ircop and have a op status in rooms.
But it did not work. Please help me
on +1:JOIN:#:{
set %nkk.lines $lines(allowip.txt)
set %nkk.line 1
:next
if %nkk.line > %nkk.lines { goto end }
if $read -l $+ %nkk.line allowip.txt !isin $address($nick,2) { goto nkline }
if $read -l $+ %nkk.line allowip.txt isin $address($nick,2) { goto nkkvoice }
inc %nkk.line
goto next
:nkkvoice
if $me isop $chan {
mode $chan +v $nick
}
:nkline
if $me isop $chan {
kline $nick IP-is-not-allow
}
:end
unset %nkk*
}