Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/modules/admin/holder2.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ GLOBAL_PROTECT(href_token)

if (deadmined)
activate()
if(C.mentor_datum)
C.mentor_position = C.mentor_datum.position
owner = C
ip_cache = C.address
cid_cache = C.computer_id
Expand Down
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(C.ckey in SSYogs.mentortickets)
var/datum/mentorticket/T = SSYogs.mentortickets[C.ckey]
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
3 changes: 1 addition & 2 deletions yogstation/code/modules/mentor/mentor_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ GLOBAL_PROTECT(mentor_verbs)

if(C.is_afk())
msg += " (AFK)"
else
msg += span_info("Mentorhelps are also sent to Discord. If no mentors are available in game mentorhelp anyways and a mentor on Discord may see it and respond.")
msg += "\n"
msg += span_info("Mentorhelps are also sent to Discord. If no mentors are available in game mentorhelp anyways and a mentor on Discord may see it and respond.")

to_chat(src, msg, confidential=TRUE)

Expand Down
2 changes: 1 addition & 1 deletion yogstation/code/modules/mentor/mentorpm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

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" = ckey, "smentor" = is_mentor(), "receive" = C.ckey, "rmentor" = C.is_mentor(), "msg" = msg)
list("round" = GLOB.round_id, "send" = ckey, "smentor" = is_mentor(), "receive" = discord_id ? whom : C.ckey, "rmentor" = discord_id ? TRUE : 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.")
Expand Down
Loading