Convert/change to a different ban system?

Been noticing after 3k bans in our ban file the plugin is starting to slow down:
Calling 'cmdBan' on 'EnhancedBanSystem v5.2.4' took 420ms [GARBAGE COLLECT]

Anyone know if you will get better performence from sqlite vs files? If so is there any easy way to convert / export the old ban file into an sqlite file?

I think you can was looking at this option today and it seems that the banlist.db file has the same table/rows as the SQL option.

you might need to download a .db to .sql converter to be able to import the values in the SQL though.

I'll try to do it and explain how-to in this thread!



Merged post

OK I managed to transfer all my bans into my SQL table 

I downloaded https://sqlitebrowser.org/ the portable version.

Imported banlist.db then Browsed Data

Selected my records right clicked and clicked copy as SQL.

Pasted all my data in an empty notepad++ tab

your line should look like this 

INSERT INTO "main"."EnhancedBanSystem" ("id", "steamid", "name", "ip", "reason", "source", "game", "platform", "server", "expire") VALUES

You need to find and replace "main"."EnhancedBanSystem" to `DATABASE`.`enhancedbansystem` notice the backticks and the lowercase

you should also find and replace all the " for ` in this line 

("id", "steamid", "name", "ip", "reason", "source", "game", "platform", "server", "expire")

 so it is like this 

(`id`, `steamid`, `name`, `ip`, `reason`, `source`, `game`, `platform`, `server`, `expire`)

or else it will not work

for the values section you can find and replace all apostrophys for double quotes and you should be fine 

Then copy all your code and paste it in the SQL tab of PHPMyAdmin.

Hope this helps 

On a side note: i don't know if we should copy the IDs, if that is the case then in DB Browser do not select the ID.