Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Nodejs Anope Database Merger  (Read 392 times)

0 Members and 1 Guest are viewing this topic.

Colten

  • Anope User
  • Offline Offline
  • Posts: 1
Nodejs Anope Database Merger
« 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 hope this can help someone!
Logged
Pages: [1]   Go Up