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 

Need a small add script :)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Danko
Voice


Joined: 09 Mar 2006
Posts: 18

PostPosted: Wed Mar 22, 2006 6:09 am    Post subject: Need a small add script :) Reply with quote

Hi there,

I need a small script for adding and reading data from a file.

The trigger it must respond to looks like this:
!add data type

If I'm not mistaken code for that part should be
Code:
set data [lindex [split $arg] 1]
set type [lindex [split $arg] 2]

However, I need to write whats added to a texfile, new line each time something gets added. Textfile should look like "unixtime type data".

For the reading part, trigger would be !find data.
Output to chan would be FOUND: data was added XXX (w/d/hr/m/s) ago (mmdd)..

Thats all I need. Smile
However, if possible and if its not too much work, there would also be quite nice with;

· Reading from textfile before adding to check if data allready exists. If so, return/halt.
· Adding the recently added data into cach/memory for 3600 seconds, and check cach/memory if data is allready there before checking from textfile (would prevent unnecessary lag/reading afaik).

I'd be greatful for any help I could get. Smile
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 -> Script Requests 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