diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm
index b7acb10ee9456..b5efb03c25bff 100644
--- a/code/modules/admin/holder2.dm
+++ b/code/modules/admin/holder2.dm
@@ -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
diff --git a/yogstation/code/datums/world_topic.dm b/yogstation/code/datums/world_topic.dm
index 97e34eb09d5e5..bae1a25fa85b6 100644
--- a/yogstation/code/datums/world_topic.dm
+++ b/yogstation/code/datums/world_topic.dm
@@ -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 += "[from]: [msg]"
to_chat(C, "Mentor PM from-[discord_mentor_link(from, from_id)]: [msg]", 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)
diff --git a/yogstation/code/modules/mentor/mentor_verbs.dm b/yogstation/code/modules/mentor/mentor_verbs.dm
index 91aff1e4d67de..5f98858219642 100644
--- a/yogstation/code/modules/mentor/mentor_verbs.dm
+++ b/yogstation/code/modules/mentor/mentor_verbs.dm
@@ -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)
diff --git a/yogstation/code/modules/mentor/mentorpm.dm b/yogstation/code/modules/mentor/mentorpm.dm
index 826c6bb5f82c4..9b5dc41f93490 100644
--- a/yogstation/code/modules/mentor/mentorpm.dm
+++ b/yogstation/code/modules/mentor/mentorpm.dm
@@ -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.")