mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 07:46:20 +00:00
Faxes get logged into the SQL server, for discord retreival. (#2874)
## About The Pull Request Faxes get logged into the SQL server, for discord retreival. Will integrate with my bot. ## Why It's Good For The Game More admins responding and seeing your faxes. ## Proof Of Testing  ## Changelog 🆑 admin: Faxes now get sent to the database. /🆑
This commit is contained in:
@@ -33,3 +33,15 @@ CREATE TABLE `vetted_list` (
|
|||||||
PRIMARY KEY (`ckey`)
|
PRIMARY KEY (`ckey`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `stored_faxes`;
|
||||||
|
CREATE TABLE `stored_faxes` (
|
||||||
|
`sender` VARCHAR(512) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
|
||||||
|
`destination_fax_machine` VARCHAR(512) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
|
||||||
|
`message` MEDIUMTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
|
||||||
|
`roundid` INT(11) NULL DEFAULT NULL,
|
||||||
|
`relayed` INT(11) NULL DEFAULT '0'
|
||||||
|
)
|
||||||
|
COLLATE='utf8mb4_general_ci'
|
||||||
|
ENGINE=InnoDB
|
||||||
|
;
|
||||||
|
|||||||
@@ -349,6 +349,20 @@ GLOBAL_VAR_INIT(nt_fax_department, pick("NT HR Department", "NT Legal Department
|
|||||||
if (istype(sent, /obj/item/paper))
|
if (istype(sent, /obj/item/paper))
|
||||||
var/obj/item/paper/sent_paper = sent
|
var/obj/item/paper/sent_paper = sent
|
||||||
log_paper("[usr] has sent a fax with the message \"[sent_paper.get_raw_text()]\" to [name]/[destination_id].")
|
log_paper("[usr] has sent a fax with the message \"[sent_paper.get_raw_text()]\" to [name]/[destination_id].")
|
||||||
|
// BUBBER EDIT BEGIN
|
||||||
|
var/datum/db_query/query = SSdbcore.NewQuery({"
|
||||||
|
INSERT INTO [format_table_name("stored_faxes")] (sender, destination_fax_machine, message, roundid, relayed)
|
||||||
|
VALUES (:sender, :destination_fax_machine, :message, :roundid, :relayed)
|
||||||
|
"}, list(
|
||||||
|
"sender" = usr,
|
||||||
|
"destination_fax_machine" = destination_id,
|
||||||
|
"message" = sent_paper.get_raw_text(),
|
||||||
|
"recipient" = name,
|
||||||
|
"roundid" = GLOB.round_id,
|
||||||
|
"relayed" = 0,
|
||||||
|
))
|
||||||
|
query.Execute()
|
||||||
|
// BUBBER EDIT END
|
||||||
return
|
return
|
||||||
log_game("[usr] has faxed [sent] to [name]/[destination_id].]")
|
log_game("[usr] has faxed [sent] to [name]/[destination_id].]")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user