mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-23 16:42:13 +00:00
DB Enhancement (#9155)
This commit is contained in:
87
SQL/migrate/V053__DB_Enhancements.sql
Normal file
87
SQL/migrate/V053__DB_Enhancements.sql
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
--
|
||||||
|
-- Adds foreign keys to a few tables and add gameid to notes/warnings/bans
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_poll_option`
|
||||||
|
ADD CONSTRAINT `FK_ss13_poll_option_ss13_poll_question` FOREIGN KEY (`pollid`) REFERENCES `ss13_poll_question` (`id`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_poll_textreply`
|
||||||
|
ADD CONSTRAINT `FK_ss13_poll_textreply_ss13_poll_question` FOREIGN KEY (`pollid`) REFERENCES `ss13_poll_question` (`id`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_poll_vote`
|
||||||
|
ADD CONSTRAINT `FK_ss13_poll_vote_ss13_poll_question` FOREIGN KEY (`pollid`) REFERENCES `ss13_poll_question` (`id`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_poll_vote`
|
||||||
|
ADD CONSTRAINT `FK_ss13_poll_vote_ss13_poll_option` FOREIGN KEY (`optionid`) REFERENCES `ss13_poll_option` (`id`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
|
||||||
|
UPDATE `ss13_death` SET `byondkey` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LOWER(`byondkey`),' ',''),'_',''),'-',''),'.',''),'@','');
|
||||||
|
UPDATE `ss13_death` SET `lakey` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LOWER(`lakey`),' ',''),'_',''),'-',''),'.',''),'@','');
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_death`
|
||||||
|
CHANGE COLUMN `pod` `pod` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Place of death' COLLATE 'utf8mb4_unicode_ci' AFTER `id`,
|
||||||
|
CHANGE COLUMN `coord` `coord` VARCHAR(255) NULL DEFAULT NULL COMMENT 'X, Y, Z POD' COLLATE 'utf8mb4_unicode_ci' AFTER `pod`,
|
||||||
|
CHANGE COLUMN `job` `job` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `tod`,
|
||||||
|
CHANGE COLUMN `special` `special` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `job`,
|
||||||
|
CHANGE COLUMN `name` `name` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `special`,
|
||||||
|
CHANGE COLUMN `byondkey` `ckey` VARCHAR(32) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `name`,
|
||||||
|
CHANGE COLUMN `laname` `laname` VARCHAR(255) NULL DEFAULT NULL COMMENT 'Last attacker name' COLLATE 'utf8mb4_unicode_ci' AFTER `ckey`,
|
||||||
|
CHANGE COLUMN `lakey` `lackey` VARCHAR(32) NULL DEFAULT NULL COMMENT 'Last attacker key' COLLATE 'utf8mb4_unicode_ci' AFTER `laname`,
|
||||||
|
CHANGE COLUMN `gender` `gender` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci' AFTER `lackey`;
|
||||||
|
|
||||||
|
UPDATE ss13_death SET pod = NULL WHERE pod = '';
|
||||||
|
UPDATE ss13_death SET coord = NULL WHERE coord = '';
|
||||||
|
UPDATE ss13_death SET job = NULL WHERE job = '';
|
||||||
|
UPDATE ss13_death SET special = NULL WHERE special = '';
|
||||||
|
UPDATE ss13_death SET name = NULL WHERE name = '';
|
||||||
|
UPDATE ss13_death SET ckey = NULL WHERE ckey = '';
|
||||||
|
UPDATE ss13_death SET laname = NULL WHERE laname = '';
|
||||||
|
UPDATE ss13_death SET lackey = NULL WHERE lackey = '';
|
||||||
|
UPDATE ss13_death SET gender = NULL WHERE gender = '';
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_death`
|
||||||
|
ADD COLUMN `char_id` INT NULL DEFAULT NULL AFTER `ckey`;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_death`
|
||||||
|
ADD CONSTRAINT `FK_ss13_death_ss13_player` FOREIGN KEY (`ckey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_death`
|
||||||
|
ADD CONSTRAINT `FK_ss13_death_ss13_player_lackey` FOREIGN KEY (`lackey`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE ON DELETE SET NULL;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_death`
|
||||||
|
ADD CONSTRAINT `FK_ss13_death_ss13_characters` FOREIGN KEY (`char_id`) REFERENCES `ss13_characters` (`id`) ON UPDATE CASCADE ON DELETE SET NULL;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_ban`
|
||||||
|
CHANGE COLUMN `id` `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT FIRST;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_ban_mirrors`
|
||||||
|
ADD CONSTRAINT `FK_ss13_ban_mirrors_ss13_ban` FOREIGN KEY (`ban_id`) REFERENCES `ss13_ban` (`id`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_stickyban_matched_cid`
|
||||||
|
ADD CONSTRAINT `FK_ss13_stickyban_matched_cid_ss13_stickyban` FOREIGN KEY (`stickyban`) REFERENCES `ss13_stickyban` (`ckey`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_stickyban_matched_ckey`
|
||||||
|
ADD CONSTRAINT `FK_ss13_stickyban_matched_ckey_ss13_stickyban` FOREIGN KEY (`stickyban`) REFERENCES `ss13_stickyban` (`ckey`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_stickyban_matched_ip`
|
||||||
|
ADD CONSTRAINT `FK_ss13_stickyban_matched_ip_ss13_stickyban` FOREIGN KEY (`stickyban`) REFERENCES `ss13_stickyban` (`ckey`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_character_incidents`
|
||||||
|
ADD CONSTRAINT `FK_ss13_character_incidents_ss13_characters` FOREIGN KEY (`char_id`) REFERENCES `ss13_characters` (`id`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_player_notifications`
|
||||||
|
ADD CONSTRAINT `FK_ss13_player_notifications_ss13_player_2` FOREIGN KEY (`created_by`) REFERENCES `ss13_player` (`ckey`) ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_ban`
|
||||||
|
ADD COLUMN `game_id` VARCHAR(32) NULL DEFAULT NULL AFTER `serverip`;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_notes`
|
||||||
|
ADD COLUMN `game_id` VARCHAR(50) NULL DEFAULT NULL AFTER `adddate`;
|
||||||
|
|
||||||
|
ALTER TABLE `ss13_warnings`
|
||||||
|
ADD COLUMN `game_id` VARCHAR(50) NULL DEFAULT NULL AFTER `time`;
|
||||||
@@ -237,68 +237,42 @@
|
|||||||
|
|
||||||
FV.add_details(details)
|
FV.add_details(details)
|
||||||
|
|
||||||
/proc/sql_report_death(var/mob/living/carbon/human/H)
|
/proc/sql_report_death(var/mob/living/H)
|
||||||
if(!config.sql_enabled || !config.sql_stats)
|
if(!config.sql_enabled || !config.sql_stats)
|
||||||
return
|
return
|
||||||
if(!H)
|
if(!H)
|
||||||
return
|
return
|
||||||
|
if(!istype(H, /mob/living/carbon/human) && !istype(H, /mob/living/silicon/robot))
|
||||||
|
return
|
||||||
if(!H.key || !H.mind)
|
if(!H.key || !H.mind)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/area/placeofdeath = get_area(H)
|
var/area/placeofdeath = get_area(H)
|
||||||
var/podname = placeofdeath ? "[placeofdeath]" : "Unknown area"
|
var/podname = placeofdeath ? "[placeofdeath]" : "Unknown area"
|
||||||
|
|
||||||
var/sqlname = sanitizeSQL(H.real_name)
|
|
||||||
var/sqlkey = sanitizeSQL(H.key)
|
|
||||||
var/sqlpod = sanitizeSQL(podname)
|
|
||||||
var/sqlspecial = sanitizeSQL(H.mind.special_role)
|
|
||||||
var/sqljob = sanitizeSQL(H.mind.assigned_role)
|
|
||||||
var/laname
|
|
||||||
var/lakey
|
|
||||||
if(H.lastattacker)
|
|
||||||
laname = sanitizeSQL(H.lastattacker:real_name)
|
|
||||||
lakey = sanitizeSQL(H.lastattacker:key)
|
|
||||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
|
||||||
var/coord = "[H.x], [H.y], [H.z]"
|
|
||||||
establish_db_connection(dbcon)
|
establish_db_connection(dbcon)
|
||||||
if(!dbcon.IsConnected())
|
if(!dbcon.IsConnected())
|
||||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
log_game("SQL ERROR during death reporting. Failed to connect.")
|
||||||
else
|
else
|
||||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO ss13_death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.getBrainLoss()], [H.getOxyLoss()], '[coord]')")
|
var/DBQuery/query = dbcon.NewQuery("INSERT INTO ss13_death (name, ckey, char_id, job, special, pod, tod, laname, lackey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES \
|
||||||
if(!query.Execute())
|
(:name:, :ckey:, :char_id:, :job:, :special:, :pod:, :tod:, :laname:, :lackey:, :gender:, :bruteloss:, :fireloss:, :brainloss:, :oxyloss:, :coord:')")
|
||||||
var/err = query.ErrorMsg()
|
if(!query.Execute(list(
|
||||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
"name"=H.real_name,
|
||||||
|
"ckey"=H.ckey,
|
||||||
|
"char_id"=H.character_id,
|
||||||
/proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
|
"job"=H?.mind.assigned_role,
|
||||||
if(!config.sql_enabled || !config.sql_stats)
|
"special"=H?.mind.special_role,
|
||||||
return
|
"pod"=podname,
|
||||||
if(!H)
|
"tod"=time2text(world.realtime, "YYYY-MM-DD hh:mm:ss"),
|
||||||
return
|
"laname"=H?.lastattacker.real_name,
|
||||||
if(!H.key || !H.mind)
|
"lackey"=H?.lastattacker.ckey,
|
||||||
return
|
"gender"=H.gender,
|
||||||
|
"bruteloss"=H.getBruteLoss(),
|
||||||
var/area/placeofdeath = get_area(H)
|
"fireloss"=H.getFireLoss(),
|
||||||
var/podname = placeofdeath ? "[placeofdeath]" : "Unknown area"
|
"brainloss"=H.getBrainLoss(),
|
||||||
|
"oxyloss"=H.getOxyLoss(),
|
||||||
var/sqlname = sanitizeSQL(H.real_name)
|
"coord"="[H.x], [H.y], [H.z]")
|
||||||
var/sqlkey = sanitizeSQL(H.key)
|
))
|
||||||
var/sqlpod = sanitizeSQL(podname)
|
|
||||||
var/sqlspecial = sanitizeSQL(H.mind.special_role)
|
|
||||||
var/sqljob = sanitizeSQL(H.mind.assigned_role)
|
|
||||||
var/laname
|
|
||||||
var/lakey
|
|
||||||
if(H.lastattacker)
|
|
||||||
laname = sanitizeSQL(H.lastattacker:real_name)
|
|
||||||
lakey = sanitizeSQL(H.lastattacker:key)
|
|
||||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
|
||||||
var/coord = "[H.x], [H.y], [H.z]"
|
|
||||||
establish_db_connection(dbcon)
|
|
||||||
if(!dbcon.IsConnected())
|
|
||||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
|
||||||
else
|
|
||||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO ss13_death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.getBrainLoss()], [H.getOxyLoss()], '[coord]')")
|
|
||||||
if(!query.Execute())
|
|
||||||
var/err = query.ErrorMsg()
|
var/err = query.ErrorMsg()
|
||||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
reason = sql_sanitize_text(reason)
|
reason = sql_sanitize_text(reason)
|
||||||
|
|
||||||
var/sql = "INSERT INTO ss13_ban (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
|
var/sql = "INSERT INTO ss13_ban (`id`,`bantime`,`serverip`,`game_id`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[game_id]','[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
|
||||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||||
query_insert.Execute()
|
query_insert.Execute()
|
||||||
to_chat(usr, "<span class='notice'>Ban saved to database.</span>")
|
to_chat(usr, "<span class='notice'>Ban saved to database.</span>")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/mob/var/lastattacker = null
|
/mob/var/mob/lastattacker = null
|
||||||
/mob/var/lastattacked = null
|
/mob/var/mob/lastattacked = null
|
||||||
/mob/var/attack_log = list()
|
/mob/var/attack_log = list()
|
||||||
|
|
||||||
proc/log_and_message_admins(var/message as text, var/mob/user = usr, var/turf/location)
|
proc/log_and_message_admins(var/message as text, var/mob/user = usr, var/turf/location)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
if(!player_ckey || !note)
|
if(!player_ckey || !note)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/list/query_details = list("ckey" = player_ckey, "address" = player_address ? player_address : null, "computer_id" = player_computerid ? player_computerid : null, "a_ckey" = null, "note" = note)
|
var/list/query_details = list("game_id" = game_id, "ckey" = player_ckey, "address" = player_address ? player_address : null, "computer_id" = player_computerid ? player_computerid : null, "a_ckey" = null, "note" = note)
|
||||||
|
|
||||||
if (!user)
|
if (!user)
|
||||||
query_details["a_ckey"] = "Adminbot"
|
query_details["a_ckey"] = "Adminbot"
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
if (!query_details["computer_id"])
|
if (!query_details["computer_id"])
|
||||||
query_details["computer_id"] = init_query.item[2]
|
query_details["computer_id"] = init_query.item[2]
|
||||||
|
|
||||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO ss13_notes (id, adddate, ckey, ip, computerid, a_ckey, content) VALUES (null, Now(), :ckey:, :address:, :computer_id:, :a_ckey:, :note:)")
|
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO ss13_notes (id, adddate, game_id, ckey, ip, computerid, a_ckey, content) VALUES (null, Now(), :game_id:, :ckey:, :address:, :computer_id:, :a_ckey:, :note:)")
|
||||||
insert_query.Execute(query_details)
|
insert_query.Execute(query_details)
|
||||||
|
|
||||||
message_admins("<span class='notice'>[key_name_admin(user)] has edited [player_ckey]'s notes.</span>")
|
message_admins("<span class='notice'>[key_name_admin(user)] has edited [player_ckey]'s notes.</span>")
|
||||||
@@ -221,81 +221,3 @@
|
|||||||
content += notes
|
content += notes
|
||||||
content += "```"
|
content += "```"
|
||||||
return content
|
return content
|
||||||
|
|
||||||
/*/proc/notes_transfer()
|
|
||||||
msg_scopes("Locating master list.")
|
|
||||||
var/savefile/note_list = new("data/player_notes.sav")
|
|
||||||
var/list/note_keys
|
|
||||||
note_list >> note_keys
|
|
||||||
|
|
||||||
msg_scopes("Establishing DB connection!")
|
|
||||||
establish_db_connection(dbcon)
|
|
||||||
if(!dbcon.IsConnected())
|
|
||||||
msg_scopes("No DB connection!")
|
|
||||||
return
|
|
||||||
|
|
||||||
for(var/t in note_keys)
|
|
||||||
var/IP = null
|
|
||||||
var/CID = null
|
|
||||||
var/DBQuery/query = dbcon.NewQuery("SELECT ip, computerid FROM ss13_player WHERE ckey = '[t]'")
|
|
||||||
query.Execute()
|
|
||||||
if(query.NextRow())
|
|
||||||
IP = query.item[1]
|
|
||||||
CID = query.item[2]
|
|
||||||
|
|
||||||
var/savefile/info = new("data/player_saves/[copytext(t, 1, 2)]/[t]/info.sav")
|
|
||||||
var/list/infos
|
|
||||||
info >> infos
|
|
||||||
|
|
||||||
for(var/datum/player_info/I in infos)
|
|
||||||
var/a_ckey = sanitizeSQL(I.author)
|
|
||||||
var/timeY = copytext(I.timestamp, findtext(I.timestamp, "of") + 3)
|
|
||||||
var/timeM
|
|
||||||
var/timeD = copytext(I.timestamp, findtext(I.timestamp, " ", 6) + 1, findtext(I.timestamp, " ", 6) + 3)
|
|
||||||
if(findtext(timeD, "s") || findtext(timeD, "n") || findtext(timeD, "r") || findtext(timeD, "t"))
|
|
||||||
timeD = "0[copytext(timeD, 1, 2)]"
|
|
||||||
|
|
||||||
// msg_scopes("Timestamp: [I.timestamp].")
|
|
||||||
var/temp = copytext(I.timestamp, 6, findtext(I.timestamp, " ", 6))
|
|
||||||
// msg_scopes("The day? [timeD].")
|
|
||||||
// msg_scopes("The month? [temp].")
|
|
||||||
// msg_scopes("The year? [timeY].")
|
|
||||||
switch(temp)
|
|
||||||
if("January")
|
|
||||||
timeM = "01"
|
|
||||||
if("February")
|
|
||||||
timeM = "02"
|
|
||||||
if("March")
|
|
||||||
timeM = "03"
|
|
||||||
if("April")
|
|
||||||
timeM = "04"
|
|
||||||
if("May")
|
|
||||||
timeM = "05"
|
|
||||||
if("June")
|
|
||||||
timeM = "06"
|
|
||||||
if("July")
|
|
||||||
timeM = "07"
|
|
||||||
if("August")
|
|
||||||
timeM = "08"
|
|
||||||
if("September")
|
|
||||||
timeM = "09"
|
|
||||||
if("October")
|
|
||||||
timeM = "10"
|
|
||||||
if("November")
|
|
||||||
timeM = "11"
|
|
||||||
if("December")
|
|
||||||
timeM = "12"
|
|
||||||
|
|
||||||
var/DTG = "[timeY]-[timeM]-[timeD] 00:00:00"
|
|
||||||
// msg_scopes("Full DTG: [DTG]")
|
|
||||||
var/insertionstuff
|
|
||||||
if(IP && CID)
|
|
||||||
insertionstuff = "INSERT INTO ss13_notes (id, adddate, ckey, ip, computerid, a_ckey, content) VALUES (null, '[DTG]', '[t]', '[IP]', '[CID]', '[a_ckey]', '[I.content]')"
|
|
||||||
else
|
|
||||||
insertionstuff = "INSERT INTO ss13_notes (id, adddate, ckey, ip, computerid, a_ckey, content) VALUES (null, '[DTG]', '[t]', null, null, '[a_ckey]', '[I.content]')"
|
|
||||||
var/DBQuery/insertquery = dbcon.NewQuery(insertionstuff)
|
|
||||||
insertquery.Execute()
|
|
||||||
if(insertquery.ErrorMsg())
|
|
||||||
msg_scopes(insertquery.ErrorMsg())
|
|
||||||
else
|
|
||||||
msg_scopes("Transfer successful.")*/
|
|
||||||
|
|||||||
@@ -43,8 +43,8 @@
|
|||||||
warned_ip = lookup_query.item[1]
|
warned_ip = lookup_query.item[1]
|
||||||
warned_computerid = lookup_query.item[2]
|
warned_computerid = lookup_query.item[2]
|
||||||
|
|
||||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO ss13_warnings (id, time, severity, reason, notes, ckey, computerid, ip, a_ckey, a_ip, a_computerid) VALUES (null, Now(), :warning_severity:, :warning_reason:, :warning_notes:, :warned_ckey:, :warned_computerid:, :warned_ip:, :a_ckey:, :a_ip:, :a_computerid:)")
|
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO ss13_warnings (id, time, game_id, severity, reason, notes, ckey, computerid, ip, a_ckey, a_ip, a_computerid) VALUES (null, Now(), :game_id:, :warning_severity:, :warning_reason:, :warning_notes:, :warned_ckey:, :warned_computerid:, :warned_ip:, :a_ckey:, :a_ip:, :a_computerid:)")
|
||||||
insert_query.Execute(list("warning_severity" = warning_severity, "warning_reason" = warning_reason, "warning_notes" = warning_notes, "warned_ckey" = warned_ckey, "warned_computerid" = warned_computerid, "warned_ip" = warned_ip, "a_ckey" = ckey, "a_ip" = address, "a_computerid" = computer_id))
|
insert_query.Execute(list("game_id" = game_id,"warning_severity" = warning_severity, "warning_reason" = warning_reason, "warning_notes" = warning_notes, "warned_ckey" = warned_ckey, "warned_computerid" = warned_computerid, "warned_ip" = warned_ip, "a_ckey" = ckey, "a_ip" = address, "a_computerid" = computer_id))
|
||||||
|
|
||||||
notes_add_sql(warned_ckey, "Warning added by [ckey], for: [warning_reason]. || Notes regarding the warning: [warning_notes].", src, warned_ip, warned_computerid)
|
notes_add_sql(warned_ckey, "Warning added by [ckey], for: [warning_reason]. || Notes regarding the warning: [warning_notes].", src, warned_ip, warned_computerid)
|
||||||
|
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
if(G)
|
if(G)
|
||||||
G.drop_item()
|
G.drop_item()
|
||||||
remove_robot_verbs()
|
remove_robot_verbs()
|
||||||
sql_report_cyborg_death(src)
|
sql_report_death(src)
|
||||||
..(gibbed,"shudders violently for a moment, then becomes motionless, its eyes slowly darkening.")
|
..(gibbed,"shudders violently for a moment, then becomes motionless, its eyes slowly darkening.")
|
||||||
Reference in New Issue
Block a user