This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

automatically change attrib of userfile from -r to +r

Old posts that have not been replied to for several years.
Locked
v
virtuoso
Halfop
Posts: 90
Joined: Fri May 16, 2003 6:52 pm

automatically change attrib of userfile from -r to +r

Post by virtuoso »

hello.

im running 3 eggdrops for windows. i want to keep the userfile -r (readonly) and then at the beginning i do :

attrib userfile -r

when i log in dcc or telnet to make some change to the userfile,i do :

.save

and automatically attrib changes from -r to +r.

i want that automatically attrib comes back to -r when the changes has been written to it. any tcl to do it ? any idea ?

thanks
v
virtuoso
Halfop
Posts: 90
Joined: Fri May 16, 2003 6:52 pm

aa

Post by virtuoso »

maybe is not the right place for this question...
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: aa

Post by user »

virtuoso wrote:maybe is not the right place for this question...
That's right. (let's hope someone moves it to the tcl forum) Try this (not tested):

Code: Select all

bind evnt - save mkreadonly
proc mkreadonly args {
	utimer 1 [list file attributes $::userfile -readonly 1]
}
Have you ever read "The Manual"?
v
virtuoso
Halfop
Posts: 90
Joined: Fri May 16, 2003 6:52 pm

hhh

Post by virtuoso »

maybe this :

bind evnt - save mkreadonly
proc mkreadonly args {
set mypath "c:\\windows\\cursors\\"
utimer 1 [list exec "c:\\windows\\system32\\attrib.exe +r $mypath$::userfile | c:\\windows\\system32\\attrib.exe +r $mypath$::chanfile"]
}

but doesn't works : in the dcc chat i see this error :

[16:08] <aalina> [16:08] Tcl error in script for 'timer7':
[16:08] <aalina> [16:08] couldn't execute "c:\windows\system32\attrib.exe +r c:\windows\cursors\v4.user | c:\windows\system32\attrib.exe +r c:\windows\cursors\v4.chan": no such file or directory

how can i fix it ?
Locked