unsaved settings
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

unsaved settings

Started by Mandyblue, 28 June, 2012, 21:19:08

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mandyblue

I'm running a hub on centos linux and if i register a user with the hub commands then as soon as i reboot the hub the user is not registered anymore.
The same thing happens with bans.
I did check the CFG files but they are writeable.
So my question is why aren't those things saved?


Thanks Mandyblue

bastya_elvtars

What do you mean by 'reboot the hub'?
Everything could have been anything else and it would have just as much meaning.

Mandyblue

what i mean with reboot is the same thing you do with your pc after let say a update...

reboot - restart

the-master

stop hub serving, save settings and shut down?
keep on sharing :)

Mandyblue

It is running as a service so i kill the process and do the thing i needed to do and then start the hub as service again, after that the bans and registered users are not present anymore according to the hub.

the-master

You kill ptokax while its running, how should it save the settings if you force it to stop?
Try !restart before killing it, that should give the hub time to save changes.
keep on sharing :)

Mandyblue

 I tried the !restart function and after i killed the proces i got the same result, the users and bans are gone. :(

PPK

Use this script to save settings, bans, regs etc. anytime you want (you need to use command !save from client connected as profile 0 [master in default])
function ChatArrival(curUser, sData)
    if curUser.iProfile == 0 then
        if sData:sub(curUser.sNick:len()+4, sData:len()-1) == "!save" then
            SetMan.Save()
            RegMan.Save()
            BanMan.Save()
            ProfMan.Save()
            Core.SendToUser(curUser, "<"..Core.GetHubSecAlias().."> Saved.|")
            return true
        end
    end
end
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Mandyblue

 That script works like a charm, thanks for the help

if i need some more answers i be back
thanks again  :-*  :-*

PPK

Good, now better script with autosave every x (by default 60) minutes  8)
nSaveInterval = 60 -- save interval in minutes

function OnStartup()
   TmrMan.AddTimer(nSaveInterval * (60 * 1000), "SaveSettings")
end

function SaveSettings(uTimerId)
   SetMan.Save()
   RegMan.Save()
   BanMan.Save()
   ProfMan.Save()
end
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Mandyblue

Thats great thanks again  :-*  :-*

SMF spam blocked by CleanTalk