how about using $read and /write ?

Code:
  
on *:OP:*: {
 if ($chan isin $read(opchan.txt,s,$chan)) && ( $opnick == $me) {
msg thx etc .. 


then just do a /write popup to add to the .txt file

sorry its sloppy but i only had a few mins