Code:
on *:dialog:protect:sclick:4: {   
  set %protect.add $$?="Enter Word:"
  write protect1.txt did -a protect 3 %protect.add   
  write protect2.txt %protect.add 
  did -a protect 3 %protect.add
  if ($active ischan) { msg $active %protect.sel has been added to protect list. }

}

on *:dialog:protect:sclick:5: {  
  write -dw $+ "* $+ %protect.sel $+ *" protect1.txt   
  write -dw $+ "* $+ %protect.sel $+ *" protect2.txt 
  did -d protect 3 $did(protect,3).sel
  did -b protect 5
  if ($active ischan) { msg $active %protect.sel has been deleted from protect list. }
}