Thread: script help
View Single Post
  #1  
Old 01-17-2009, 03:56 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
PHP Code:
function resetAll() {
  
temp.folder.loadFolder("accounts/*"true);
  
  for (
temp.file folder) {
    if (!
file.ends(".txt")) {
      continue;
    }
    
    
file file.substring(0file.length() - 4); // remove extension
    
temp.tokens file.tokenize("/"); // split between slashes
    
    
sendtorc("/reset" SPC tokens[tokens.size()]);
  }

I imagine something like this would work, but I've never tried anything like it. No rights should be needed; loadFolder works with no read rights as far as I know.
__________________
Reply With Quote