mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
ip intel mk2 (#82683)
Do not merge this without coordinating with your server's host. Slightly refactors the way we handle IP intel. You can still use the old data stored in the database. Adds the ability to automatically reject connections determined by config flags. We used to have IP intel to check for VPNs, although it was disabled due to being bad and unhelpful. This refactor should make it much more manageable for hosts and admins. This adds a new SQL table `ipintel_whitelist` Look at the schema! 🆑 admin: The return of IPIntel /🆑 --------- Co-authored-by: MrStonedOne <kyleshome@gmail.com> Co-authored-by: oranges <email@oranges.net.nz>
This commit is contained in:
committed by
Useroth
co-authored by
MrStonedOne
oranges
parent
344213fb50
commit
8f8195da22
@@ -2,21 +2,36 @@ Any time you make a change to the schema files, remember to increment the databa
|
||||
|
||||
Make sure to also update `DB_MAJOR_VERSION` and `DB_MINOR_VERSION`, which can be found in `code/__DEFINES/subsystem.dm`.
|
||||
|
||||
The latest database version is 5.29 (5.26 for /tg/); The query to update the schema revision table is:
|
||||
The latest database version is 5.30 (5.27 for /tg/); The query to update the schema revision table is:
|
||||
|
||||
```sql
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 29);
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 30);
|
||||
```
|
||||
or
|
||||
|
||||
```sql
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 29);
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 30);
|
||||
```
|
||||
|
||||
In any query remember to add a prefix to the table names if you use one.
|
||||
|
||||
-----------------------------------------------------
|
||||
Version 5.29, 08 January 2024, by distributivgesetz
|
||||
Version 5.30, 26 April 2024, by zephyrtfa
|
||||
Add the ip intel table
|
||||
```sql
|
||||
DROP TABLE IF EXISTS `ipintel`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `ipintel` (
|
||||
`ip` int(10) unsigned NOT NULL,
|
||||
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`intel` double NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ip`),
|
||||
KEY `idx_ipintel` (`ip`,`intel`,`date`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
```
|
||||
-----------------------------------------------------
|
||||
Version 5.29, 08 January 2024, by Useroth
|
||||
Add a new table for age-checking purposes. Optional if you don't ever intend to use the age prompt.
|
||||
|
||||
```sql
|
||||
|
||||
@@ -220,6 +220,20 @@ CREATE TABLE `ipintel` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `ipintel_whitelist`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ipintel_whitelist`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `ipintel_whitelist` (
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`admin_ckey` varchar(32) NOT NULL,
|
||||
PRIMARY KEY (`ckey`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `legacy_population`
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user