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 

Save stats in script

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


Joined: 04 Nov 2011
Posts: 6

PostPosted: Fri Nov 04, 2011 2:35 am    Post subject: Save stats in script Reply with quote

Hello! Please help with the script at the link
The problem is: After you restart bot stats reset. Thank you!
http://www.egghelp.ru/download.php?id=646
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3584
Location: Mint Factory

PostPosted: Fri Nov 04, 2011 6:11 am    Post subject: Reply with quote

Code:

bind evnt - prerestart ::statistics::prerestart

proc statistics::prerestart {type} {
::statistics::save
}

add this before "# Quits." and it should save your statistics just before a restart.
_________________
I tawt I taw a puddy tat!
Back to top
View user's profile Send private message
Statium
Voice


Joined: 04 Nov 2011
Posts: 6

PostPosted: Fri Nov 04, 2011 12:32 pm    Post subject: Reply with quote

Hasn't helped ;(
Back to top
View user's profile Send private message
Statium
Voice


Joined: 04 Nov 2011
Posts: 6

PostPosted: Sat Nov 05, 2011 1:53 pm    Post subject: Reply with quote

Nobody can help?
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3584
Location: Mint Factory

PostPosted: Sun Nov 06, 2011 9:48 am    Post subject: Reply with quote

I've just noticed there's a 'load' function. Since the bot will loose the IRC connection, we will rely on that to call the load function.
Code:

bind evnt - init-server ::statistics:connect

proc statistics:connect init-server {
::statistics::load
}

Add this code after the one posted above, and then .rehash the bot.
_________________
I tawt I taw a puddy tat!
Back to top
View user's profile Send private message
Statium
Voice


Joined: 04 Nov 2011
Posts: 6

PostPosted: Sun Nov 06, 2011 12:34 pm    Post subject: Reply with quote

All doesn't help Sad
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