egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
sKy
Op


Joined: 14 Apr 2005
Posts: 194
Location: Germany

PostPosted: Tue Aug 28, 2007 5:10 pm    Post subject: want to store variabels on disk and in memory at same time Reply with quote

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.
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Tue Aug 28, 2007 5:26 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Aug 28, 2007 8:59 pm    Post subject: Reply with quote

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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber