Skip to content

Commit

Permalink
Fixes discord mentor messages not being logged in database or mentor …
Browse files Browse the repository at this point in the history
…tickets
  • Loading branch information
Oblisk234 committed Dec 7, 2024
1 parent ef0102e commit 452bb80
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions yogstation/code/datums/world_topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ GLOBAL_VAR_INIT(mentornoot, FALSE)
SEND_SOUND(C, sound('sound/misc/nootnoot.ogg'))
else
SEND_SOUND(C, sound('sound/items/bikehorn.ogg'))
var/datum/DBQuery/add_mhelp_query = SSdbcore.NewQuery(
"INSERT INTO `[format_table_name("mentor_interactions")]` (round_id, ckey, ckey_mentor, target_ckey, target_mentor, message) VALUES (:round, :send, :smentor, :receive, :rmentor, :msg);",
list("round" = GLOB.round_id, "send" = from, "smentor" = TRUE, "receive" = C.ckey, "rmentor" = C.is_mentor(), "msg" = msg)
)
if(!add_mhelp_query.Execute())
message_admins("Failed insert mhelp into mhelp DB. Check the SQL error logs for more details.")
qdel(add_mhelp_query)
if(ckey in SSYogs.mentortickets)

Check failure on line 96 in yogstation/code/datums/world_topic.dm

View workflow job for this annotation

GitHub Actions / Lints

got '{', expected one of: '}', ';', if, while, do, for, spawn, switch, try, set, break, continue, del, var, return, CRASH, throw, goto, operator, term
var/datum/mentorticket/T = SSYogs.mentortickets[ckey]

Check failure on line 97 in yogstation/code/datums/world_topic.dm

View workflow job for this annotation

GitHub Actions / Lints

inconsistent multiple indentation: 2 > 1
T.log += "<b>[from]:</b> [msg]"
to_chat(C, "<font color='purple'>Mentor PM from-<b>[discord_mentor_link(from, from_id)]</b>: [msg]</font>", confidential = TRUE)
var/show_char_recip = !C.is_mentor() && CONFIG_GET(flag/mentors_mobname_only)
for(var/client/X in GLOB.mentors | GLOB.permissions.admins)
Expand Down

0 comments on commit 452bb80

Please sign in to comment.