Redo hwid bans - reduce amount of db queries on login
Works by loading all hwid bans on startup and querying the collection in memory rather than making calls on every login.
This commit is contained in:
@@ -6,3 +6,12 @@ CREATE TABLE ip_ban
|
||||
PRIMARY KEY (ip)
|
||||
);
|
||||
GRANT SELECT, INSERT ON TABLE ip_ban TO ${server-username};
|
||||
|
||||
CREATE TABLE hwid_ban
|
||||
(
|
||||
hwid varchar(30) NOT NULL,
|
||||
account_id integer,
|
||||
created_at timestamp DEFAULT now() NOT NULL,
|
||||
PRIMARY KEY (hwid)
|
||||
);
|
||||
GRANT SELECT ON TABLE hwid_ban TO ${server-username};
|
||||
|
||||
Reference in New Issue
Block a user