Log telemetry connections in DB (#63435)

About The Pull Request

Logs tgui telemetry connections into the database. Useful since they are normally capped to 5.

Does not change the fact that the "banned account in connection history" part is still based on your history at that time. I figured it could potentially be very slow to go through your entire database history.
This commit is contained in:
Mothblocks
2021-12-22 16:52:17 +13:00
committed by GitHub
parent 360d2659af
commit f0c78c9667
5 changed files with 97 additions and 6 deletions
+16
View File
@@ -677,6 +677,22 @@ CREATE TABLE `SS13_known_alts` (
UNIQUE INDEX `unique_contraints` (`ckey1` , `ckey2`)
);
--
-- Table structure for table `telemetry_connections`
--
DROP TABLE IF EXISTS `SS13_telemetry_connections`;
CREATE TABLE `SS13_telemetry_connections` (
`id` INT NOT NULL AUTO_INCREMENT,
`ckey` VARCHAR(32) NOT NULL,
`telemetry_ckey` VARCHAR(32) NOT NULL,
`address` INT(10) NOT NULL,
`computer_id` VARCHAR(32) NOT NULL,
`first_round_id` INT(11) UNSIGNED NULL,
`latest_round_id` INT(11) UNSIGNED NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `unique_constraints` (`ckey` , `telemetry_ckey` , `address` , `computer_id`)
);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;