Ticket improvements (#4432)

Adds some features and fixes some shit:

Closing of tickets sent to Discord will now alert discord as well.
Adds a reminder period for tickets which starts after they're opened. It's intended to remind staff to close their tickets. Say, something like 10 minutes since opening sounds like a solid idea. If the staff who claimed it is offline, then all staff are reminded of it.
Adds the logging of all tickets to the database at the end of round. Sortable by staff closing, person opening, time opened, time closed, and round ID. This is primarily for Aboshehab.
This commit is contained in:
Erki
2018-03-25 16:32:12 +03:00
committed by GitHub
parent 24433b2e9f
commit 18baa01d0a
9 changed files with 121 additions and 11 deletions

View File

@@ -277,6 +277,8 @@ var/list/gamemode_cache = list()
var/iterative_explosives_z_threshold = 10
var/iterative_explosives_z_multiplier = 0.75
var/ticket_reminder_period = 0
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
for (var/T in L)
@@ -850,6 +852,12 @@ var/list/gamemode_cache = list()
if("show_game_type_odd")
config.show_game_type_odd = 1
if ("ticket_reminder_period")
ticket_reminder_period = text2num(value)
if (ticket_reminder_period < 1)
ticket_reminder_period = 0
else
log_misc("Unknown setting in configuration: '[name]'")

View File

@@ -167,6 +167,7 @@
var/DBQuery/query_insert = dbcon.NewQuery(sql)
query_insert.Execute()
log_all_tickets()
// Sanitize inputs to avoid SQL injection attacks
/proc/sql_sanitize_text(var/text)