i have a problem with channels that been stored in a file
and must readed as channel where the command is given in
this is the code part :
Code: Select all
if {([strlwr $arg] == "on")} {
set allvoicechannels 0
set readin [open ${allvoicefile} r]
while {![eof $readin]} {
set raw_initdata [gets $readin]
if {[eof $readin]} {break}
if {${raw_initdata} == [strlwr $chan]} {
set allvoicechannels 1
break
}
continue
}
close $readin
if {$allvoicechannels == 1} { putserv "NOTICE $nick :Channel $chan is already in my Allvoice List" ; return 0 }
set create [open ${allvoicefile} a]
puts $create [strlwr $chan]
close $create
set allvoicechannels 0
set readin [open ${allvoicefile} r]
while {![eof $readin]} {
set raw_initdata [gets $readin]
if {[eof $readin]} {break}
if {${raw_initdata} == [strlwr $chan]} {
set allvoicechannels 1
break
}
continue
}
close $readin
if {$allvoicechannels == 1} { putserv "NOTICE $nick :Channel $chan succesfully added to my Allvoice List" ; return 0 }
}
This file wirte the channel in the file as : #mp³{zone}
On the putlog and on channel it puch the same name out, whilt it will not be the same by de code:
Code: Select all
on partyline : [12:55] <DragonSlayer> [12:55] readin : #mp³{zone} of channel #mp³{zone}
on chanel : [12:58] < DragonSlayer > Channel #mp³{zone} is readed, #mp³{zone} must it be ?
What must i do to get the good check that when $raw_initdata == $chan?
On normal channel like #trivia, the script is doning what he must do!
Greets TeDDyBeeR