PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Herodes on 02 April, 2005, 13:37:40

Title: HOW TO: Get your registered users to the new PtX..
Post by: Herodes on 02 April, 2005, 13:37:40
You can transfer your registered users to the xml fomat of the new PtokaX, using this script. I don't have any idea if the new PtokaX can do it on its own,.. so pls tell me if this effort is in vain ;P...

This is a very rough and untest script..
pls post feedback...
-- MoveRegs by Herodes v1

function Main()
local f=io.open( "RegisteredUser.dat", "r");
if f then
for l in f:lines() do
local s,e,nick,pass,prof = string.find( l, "^([^|]+)|([^|]+)|(%d+)$");
AddRegUser(nick, pass, tonumber(prof));
end
else
error("couldn't find RegisteredUsers.dat,.. make sure it is in your scripts folder..");
end
end
Title:
Post by: Cid on 02 April, 2005, 18:11:41
when the new version came out i just put the files of the .rar in my ptokax folder started the hubsoft and the registered users of the old .dat were in the .xml. so i think it does it on its own.
Title:
Post by: Dessamator on 02 April, 2005, 19:09:32
yap i agree, but it only does the converting during the first time, when u start the ptokax, if u try to add later, it doesnt do anything!!!, so i guess ur script might b usefull in some cases.
Title:
Post by: bastya_elvtars on 02 April, 2005, 19:35:03
QuoteOriginally posted by Dessamator
yap i agree, but it only does the converting during the first time, when u start the ptokax, if u try to add later, it doesnt do anything!!!, so i guess ur script might b usefull in some cases.

Why would you use it after upgrade? :S
Title:
Post by: PPK on 02 April, 2005, 19:40:52
QuoteOriginally posted by Dessamator
 if u try to add later, it doesnt do anything!!!
It convert old config files only if new .xml not exist  :]
Title:
Post by: Madman on 02 April, 2005, 19:42:31
QuoteOriginally posted by Dessamator
yap i agree, but it only does the converting during the first time, when u start the ptokax, if u try to add later, it doesnt do anything!!!, so i guess ur script might b usefull in some cases.

Yes it does...

if you have started it ones.. but forgot to convert your RegistedUsers.dat, all you have to do is open the cfg folder,
delete the RegistedUsers.xml and put the RegistedUsers.dat in the ptokax folder and then start ptokax,
and it's get converted...

same goes for PermBan.dat and Banlist.xml

it only tryes to convert RegistedUsers.dat if there is no RegistedUsers.xml

*Edit*

Damm PPK was faster ;p
Title:
Post by: Dessamator on 02 April, 2005, 20:13:48
QuoteOriginally posted by bastya_elvtars
QuoteOriginally posted by Dessamator
yap i agree, but it only does the converting during the first time, when u start the ptokax, if u try to add later, it doesnt do anything!!!, so i guess ur script might b usefull in some cases.

Why would you use it after upgrade? :S
well simply because a person, might not know what sequence to follow, he might start ptokax then put the .dat files there!


QuoteIt convert old config files only if new .xml not exist
well, since thats the case there might not be much use for that script, but as you and many ppl know ,some ppl are just "hard -headed", they wouldnt understand what to delete, anyway, both approches work, although one is simpler than the other !
Title:
Post by: remaster-it on 03 April, 2005, 21:19:37
the easiest way  i found  (has worked on all hubs  have done to so far)  


Stop the Ptokax  make  a back up of  the CFG folder to a nother area of the system  (my docs for example)
 
Then delete the the CFG folder


copy the DAT files from the earlier version (except the profile.dat) to the root directory of the new hub (where Ptokax.exe is)


Start the program  and the program  will recreate the cfg folder  and change the formats to the XML version  on its own  

if using robocop - copy 16.09HUB\scripts\profiles\PtokaX 16.07or higher\profile.xml  ..  and place in the CFG directory of the new Ver  ..  after restarting Ptokax