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.

want to store variabels on disk and in memory at same time

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
sKy
Op
Posts: 194
Joined: Thu Apr 14, 2005 5:58 pm
Location: Germany

want to store variabels on disk and in memory at same time

Post by sKy »

I could write this myself, but because i don`t want to reinvent the wheel if not needed. I am asking here if what I want to do is already done.

I want to store variables inside the memory but them shall be permanently saved on harddisk also. Each time I modify a variable or restart the bot this variable shall be read from a file on harddisk. If I just want to read them, them shall be in memory for faster access.

Any idea?
socketapi | Code less, create more.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

I don't think its been done already, but a simple rename on the variable/set proc and add in a regexp check maybe (to check syntax + check namespace if used), then save to your file and set the var.

On bot loadup, just load the contents of the file instead of accessing it and then keeping it in memory, it would cause more hassle checking if the var does not exist in both cases if you know what i mean.
r0t3n @ #r0t3n @ Quakenet
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I'd say it'd be easier to use the trace-command if it's a limited set of variables. This would also cover all other commands that affect variables, as there are more than just "set" and "variable"
NML_375
Post Reply