hi,
i m need of a script which could merge two registered users xml file as, i redirect non-registered users to other hub to get themselves regged. and also i have regged some users in the main hub so now i need to merge the 2 xmls files with all the users (common and uncommon) in both the xml files.
so can some 1 plzz make 1 such script?
thks,
achiever.
Would be quicker to open the 2 files up in notepad and copy and paste the extra 1s over .
but i will have to search for the extra names and it would surely be a difficult task to campare so many names.
There is a program called WinMerge (http://winmerge.org/). It compares two files.
Quote from: bastya_elvtars on 20 May, 2007, 15:40:34
There is a program called WinMerge. It compares two files.
a effective tool
but it also changes the pass of users if it has been changed by him back again to old 1's :( , had to do a lot of work to get this done.
is there some other method to just add the details of new nicks and not change ne other part to both xmls?
thks,
I think reglists can only be sync'd if one hub connects to another as a client.
and how can that be done?
It can be scripted with luasockets.
can simple script not be made to compare the two xmls and add the nick absent from either?
Quote from: achiever on 21 May, 2007, 15:42:49
can simple script not be made to compare the two xmls and add the nick absent from either?
That requires a lua module too. Synchronizing via PtokaX is easier and no hubrestart is needed after synchronization as well.
plzz xplain how should i go on doing this?
I still say opening the 2 XML's up and copy and pasting would have been easyer ... I ve done this before ..
Backup both copys up 1st ... open to 2 files up in notepad(or whatever you use) copy and paste all nicks into the other ..
When you then start hub up, you shud get popup saying duplicate user reg'd with option to delete ( or somethin along them lines )..
Takes about 30 - 60 secs depending on how many users are reg'd
In fact it requires a hubside script as well to provide the data available to the hub. An example of simple communication:
connect -> LockToKey handshake -> sending a unique command, like $RegSync <password> -> would send back the data required (return value of GetRegisteredUsers() coinverted to a string) and then close the conn.
Hell of work.
Quote from: Tw?sT?d-d?v?l on 21 May, 2007, 21:21:51
I still say opening the 2 XML's up and copy and pasting would have been easyer ... I ve done this before ..
Backup both copys up 1st ... open to 2 files up in notepad(or whatever you use) copy and paste all nicks into the other ..
When you then start hub up, you shud get popup saying duplicate user reg'd with option to delete ( or somethin along them lines )..
Takes about 30 - 60 secs depending on how many users are reg'd
i did not understand u earlier i have not recieved ne popup or ne such thing alerting me of duplicate users.
in fact the xml has still got duplicate users and when my ptokax starts it has just the original list :(
whats going wrong
By any chance did you copy these lines too
<?xml version="1.0" encoding="windows-1252" standalone="yes" ?>
<RegisteredUsers>
If you have these in the regusers.xml twice make sure you remove the 2nd one .
Dose urs look something like this , If so remove where i put remove
<?xml version="1.0" encoding="windows-1252" standalone="yes" ?> <<<<<< Keep
<RegisteredUsers> <<<<<< Keep
<RegisteredUser>
<Nick>(Angmar)</Nick>
<Password>****</Password>
<Profile>1</Profile>
</RegisteredUser>
<RegisteredUser>
<Nick>(NRG)Rebel</Nick>
<Password>****</Password>
<Profile>1</Profile>
</RegisteredUser>
<?xml version="1.0" encoding="windows-1252" standalone="yes" ?> <<<<<< Remove
<RegisteredUsers> <<<<<< Remove
<RegisteredUser>
<Nick>(Angmar)</Nick>
<Password>****</Password>
<Profile>1</Profile>
</RegisteredUser>
<RegisteredUser>
<Nick>(NRG)Rebel</Nick>
<Password>****</Password>
<Profile>1</Profile>
</RegisteredUser>
If you need help with it email me the 2 files and ill do them for you
twisted-devil@hotmail.co.uk
thanks a looooottttttt for ur help
i was not copying the 1st two lines but instead i was copying the last 1
again thanks a lot for ur help :))
achiever