mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
adds round id to ban table
This commit is contained in:
@@ -1,3 +1,13 @@
|
|||||||
|
26 May 2017, by Jordie0608
|
||||||
|
|
||||||
|
Modified table 'ban', adding the column 'round_id'.
|
||||||
|
|
||||||
|
ALTER TABLE `feedback`.`ban` ADD COLUMN `round_id` INT(11) NOT NULL AFTER `server_port`
|
||||||
|
|
||||||
|
Remember to add a prefix to the table name if you use them.
|
||||||
|
|
||||||
|
----------------------------------------------------
|
||||||
|
|
||||||
21 April 2017, by Jordie0608
|
21 April 2017, by Jordie0608
|
||||||
|
|
||||||
Modified table 'player', adding the column 'accountjoindate', removing the column 'id' and making the column 'ckey' the primary key.
|
Modified table 'player', adding the column 'accountjoindate', removing the column 'id' and making the column 'ckey' the primary key.
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ CREATE TABLE `ban` (
|
|||||||
`bantime` datetime NOT NULL,
|
`bantime` datetime NOT NULL,
|
||||||
`server_ip` int(10) unsigned NOT NULL,
|
`server_ip` int(10) unsigned NOT NULL,
|
||||||
`server_port` smallint(5) unsigned NOT NULL,
|
`server_port` smallint(5) unsigned NOT NULL,
|
||||||
|
`round_id` int(11) NOT NULL,
|
||||||
`bantype` enum('PERMABAN','TEMPBAN','JOB_PERMABAN','JOB_TEMPBAN','ADMIN_PERMABAN','ADMIN_TEMPBAN') NOT NULL,
|
`bantype` enum('PERMABAN','TEMPBAN','JOB_PERMABAN','JOB_TEMPBAN','ADMIN_PERMABAN','ADMIN_TEMPBAN') NOT NULL,
|
||||||
`reason` varchar(2048) NOT NULL,
|
`reason` varchar(2048) NOT NULL,
|
||||||
`job` varchar(32) DEFAULT NULL,
|
`job` varchar(32) DEFAULT NULL,
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ CREATE TABLE `SS13_ban` (
|
|||||||
`bantime` datetime NOT NULL,
|
`bantime` datetime NOT NULL,
|
||||||
`server_ip` int(10) unsigned NOT NULL,
|
`server_ip` int(10) unsigned NOT NULL,
|
||||||
`server_port` smallint(5) unsigned NOT NULL,
|
`server_port` smallint(5) unsigned NOT NULL,
|
||||||
|
`round_id` int(11) NOT NULL,
|
||||||
`bantype` enum('PERMABAN','TEMPBAN','JOB_PERMABAN','JOB_TEMPBAN','ADMIN_PERMABAN','ADMIN_TEMPBAN') NOT NULL,
|
`bantype` enum('PERMABAN','TEMPBAN','JOB_PERMABAN','JOB_TEMPBAN','ADMIN_PERMABAN','ADMIN_TEMPBAN') NOT NULL,
|
||||||
`reason` varchar(2048) NOT NULL,
|
`reason` varchar(2048) NOT NULL,
|
||||||
`job` varchar(32) DEFAULT NULL,
|
`job` varchar(32) DEFAULT NULL,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
computerid = "0"
|
computerid = "0"
|
||||||
if(!ip)
|
if(!ip)
|
||||||
ip = "0.0.0.0"
|
ip = "0.0.0.0"
|
||||||
var/sql = "INSERT INTO [format_table_name("ban")] (`bantime`,`server_ip`,`server_port`,`bantype`,`reason`,`job`,`duration`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`) VALUES (Now(), INET_ATON('[world.internet_address]'), '[world.port]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', INET_ATON('[ip]'), '[a_ckey]', '[a_computerid]', INET_ATON('[a_ip]'), '[who]', '[adminwho]')"
|
var/sql = "INSERT INTO [format_table_name("ban")] (`bantime`,`server_ip`,`server_port`,`round_id`,`bantype`,`reason`,`job`,`duration`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`) VALUES (Now(), INET_ATON('[world.internet_address]'), '[world.port]', '[GLOB.round_id]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', INET_ATON('[ip]'), '[a_ckey]', '[a_computerid]', INET_ATON('[a_ip]'), '[who]', '[adminwho]')"
|
||||||
var/datum/DBQuery/query_add_ban = SSdbcore.NewQuery(sql)
|
var/datum/DBQuery/query_add_ban = SSdbcore.NewQuery(sql)
|
||||||
if(!query_add_ban.warn_execute())
|
if(!query_add_ban.warn_execute())
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user