Anope IRC Services

Anope Support => 2.0.x/1.9.x Support => Topic started by: Colten on April 03, 2019, 09:29:42 AM

Title: Nodejs Anope Database Merger
Post by: Colten on April 03, 2019, 09:29:42 AM
I needed to merge a large set of database backup files to gain back user accounts because I set a low expiration time and years later wanted to gain back all the user accounts that were lost and given up on.

So I quickly created this to loop through a directories files that start with the name anope. This script will go in reverse order of how ever the os handles filename collation (alphabetical/numerical orders).

You will need nodejs to run this.
There are a few options. Most notably the seeninfoMergeALL option. If seeninfo is set to true and seeninfoMergeALL is set to true. All seeninfo blocks will be merged into the new one.
If seeninfoMergeALL is set to false. It will only save the seeninfo blocks from the first file and for any registered user found in the nickcore blocks.

Here is the script https://pastebin.com/7G81DdWs (https://pastebin.com/7G81DdWs) hope this can help someone!