mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge remote-tracking branch 'upstream/dev-freeze' into dev
This commit is contained in:
@@ -294,6 +294,7 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
|
||||
/hook/startup/proc/loadMods()
|
||||
world.load_mods()
|
||||
world.load_mentors() // no need to write another hook.
|
||||
return 1
|
||||
|
||||
/world/proc/load_mods()
|
||||
@@ -311,7 +312,26 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
continue
|
||||
|
||||
var/title = "Moderator"
|
||||
if(config.mods_are_mentors) title = "Mentor"
|
||||
var/rights = admin_ranks[title]
|
||||
|
||||
var/ckey = copytext(line, 1, length(line)+1)
|
||||
var/datum/admins/D = new /datum/admins(title, rights, ckey)
|
||||
D.associate(directory[ckey])
|
||||
|
||||
/world/proc/load_mentors()
|
||||
if(config.admin_legacy_system)
|
||||
var/text = file2text("config/mentors.txt")
|
||||
if (!text)
|
||||
error("Failed to load config/mentors.txt")
|
||||
else
|
||||
var/list/lines = text2list(text, "\n")
|
||||
for(var/line in lines)
|
||||
if (!line)
|
||||
continue
|
||||
if (copytext(line, 1, 2) == ";")
|
||||
continue
|
||||
|
||||
var/title = "Mentor"
|
||||
var/rights = admin_ranks[title]
|
||||
|
||||
var/ckey = copytext(line, 1, length(line)+1)
|
||||
|
||||
Reference in New Issue
Block a user