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 

Storage information

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


Joined: 26 Dec 2008
Posts: 205
Location: Quakenet, #Football

PostPosted: Fri Dec 26, 2008 3:11 pm    Post subject: Storage information Reply with quote

Hi, I`m looking for a tcl script that can store lines by my request like
when I type !addfixtures line1 bla
it will write bla on the first line of fixtures.txt so that I can write as much lines as I want on that file, of course I can also !del the file or !clear the file so it will be empty.

and if someone types !fixtures on the chat room, it will play the user fixtures.txt

anyone please?

thanks
Back to top
View user's profile Send private message
Nimos
Halfop


Joined: 20 Apr 2008
Posts: 80

PostPosted: Thu Jan 01, 2009 9:14 pm    Post subject: Reply with quote

http://nimos.pastebin.com/m43a42a95

this should work...but !addfixture adds the line always at the END of the file, you cant set WHERE

!delfixtures [number] will remove a line (starting with "0" as first line number), if no [number] is specified, it will clear the whole file.
Back to top
View user's profile Send private message
Papillon
Owner


Joined: 15 Feb 2002
Posts: 724
Location: *.no

PostPosted: Thu Jan 01, 2009 9:38 pm    Post subject: Reply with quote

not that hard to decide where to put the line in the file. just add the whole file to a list, with each line as an element. then do linsert where you want the file, before adding all the lines back to the file
_________________
Elen sila lúmenn' omentielvo
Back to top
View user's profile Send private message MSN Messenger
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