mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Space saving
This commit is contained in:
@@ -361,7 +361,7 @@ DROP TABLE IF EXISTS `privacy`;
|
||||
CREATE TABLE `privacy` (
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`datetime` datetime NOT NULL,
|
||||
`consent` varchar(128) NOT NULL,
|
||||
`consent` bit(1) NOT NULL,
|
||||
PRIMARY KEY (`ckey`),
|
||||
UNIQUE KEY `ckey_UNIQUE` (`ckey`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
@@ -360,7 +360,7 @@ DROP TABLE IF EXISTS `SS13_privacy`;
|
||||
CREATE TABLE `ss13_privacy` (
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`datetime` datetime NOT NULL,
|
||||
`consent` varchar(128) NOT NULL,
|
||||
`consent` bit(1) NOT NULL,
|
||||
PRIMARY KEY (`ckey`),
|
||||
UNIQUE KEY `ckey_UNIQUE` (`ckey`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ DROP TABLE `privacy`;
|
||||
CREATE TABLE `privacy` (
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`datetime` datetime NOT NULL,
|
||||
`consent` varchar(128) NOT NULL,
|
||||
`consent` bit(1) NOT NULL,
|
||||
PRIMARY KEY (`ckey`),
|
||||
UNIQUE KEY `ckey_UNIQUE` (`ckey`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(!dbcon.IsConnected())
|
||||
consent = 1
|
||||
return
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]' AND consent='SIGNED'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]' AND consent=1")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
consent = 1
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
if(href_list["consent_signed"])
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/DBQuery/query = dbcon.NewQuery("REPLACE INTO [format_table_name("privacy")] (ckey, datetime, consent) VALUES ('[ckey]', '[sqltime]', 'SIGNED')")
|
||||
var/DBQuery/query = dbcon.NewQuery("REPLACE INTO [format_table_name("privacy")] (ckey, datetime, consent) VALUES ('[ckey]', '[sqltime]', 1)")
|
||||
query.Execute()
|
||||
src << browse(null, "window=privacy_consent")
|
||||
consent = 1
|
||||
@@ -155,7 +155,7 @@
|
||||
consent = 0
|
||||
to_chat(usr, "<span class='warning'>You must consent to the terms of service before you can join!</span>")
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/DBQuery/query = dbcon.NewQuery("REPLACE INTO [format_table_name("privacy")] (ckey, datetime, consent) VALUES ('[ckey]', '[sqltime]', 'NOTSIGNED')")
|
||||
var/DBQuery/query = dbcon.NewQuery("REPLACE INTO [format_table_name("privacy")] (ckey, datetime, consent) VALUES ('[ckey]', '[sqltime]', 0)")
|
||||
query.Execute()
|
||||
|
||||
if(href_list["show_preferences"])
|
||||
|
||||
Reference in New Issue
Block a user