Hm, why do you want to remove $chr(35) in your filenames? # is a valid char for filenames, and (in theory) it will mix things up for channels like "#testchan" vs "#test#chan".
I'd use $mkfn here instead - $mkfn replaces all invalid chars with underscores. You still *may* have identical filenames with this method, but less likely, and at least you ensure to have valid filenames.

Another note: if the "games.enabled.txt" is a plain list of channel names, you could use an .ini instead of a .txt:
- doing a "if $readini ... remini" instead of the "if $read(w) ... /write -ds"
- or /writeini the channel's setting to "on" or "off" instead of adding/removing a line to switch it

Code:
elseif ($1- == !enable games) && ($read(games.enabled.txt,w,$chan)) {

  write -ds games.enabled.txt $chan
  msg $chan 3Games enabled for $chan

  var %maindir = C:\Documents and Settings\Sean's\My Documents\Web\my\its-meme\

  ; if you want to use remove
  var %chandir = %maindir $+ $remove($chan,$chr(35)) $+ \

  ;        alternatively, if you want to use $mkfn
  ;        var %chandir = %maindir $+ $mkfn($chan) $+ \

  ; find all files named "index.html" in the %chandir, up to 2 dirs deep (that is: including direct subdirs).
  ; perform the command "Set114on" on these files. 
  noop $findfile(%chandir, index.html, 0, 2, Set114on $qt($1-))

  ;        The findfile loop above calls an alias, this allows you to modify multiple lines per file.
  ;        If you have only one line to change per file you could use the shorter:
  ;        noop $findfile(%chandir, index.html, 0, 2, write -l114 $qt($1-) <p>Games - Enabled</p>)

}

alias -l Set114on { write -l114 $1- <p>Games - Enabled</p> }


Edit: fixed wrong varnames

Last edited by Horstl; 13/04/09 02:51 AM.