mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
[MAJOR CHANGE] Admin rank datum (#17133)
* Admin ranks update * Permissions fix * One missing thing * Further rework to make database also fully work * Adds admin rank bitflag calculator to tools * ZA WARUDO --------- Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
@@ -524,7 +524,7 @@
|
||||
|
||||
if(chosen_species && use_species_name)
|
||||
// Have to recheck admin due to no usr at roundstart. Latejoins are fine though.
|
||||
if(is_alien_whitelisted(chosen_species))
|
||||
if(is_alien_whitelisted(src.client, chosen_species))
|
||||
new_character = new(T, use_species_name)
|
||||
|
||||
if(!new_character)
|
||||
@@ -600,9 +600,6 @@
|
||||
src << browse(null, "window=News") //closes news window
|
||||
panel.close()
|
||||
|
||||
/mob/new_player/proc/has_admin_rights()
|
||||
return check_rights(R_ADMIN, 0, src)
|
||||
|
||||
/mob/new_player/get_species()
|
||||
var/datum/species/chosen_species
|
||||
if(client.prefs.species)
|
||||
@@ -611,7 +608,7 @@
|
||||
if(!chosen_species)
|
||||
return SPECIES_HUMAN
|
||||
|
||||
if(is_alien_whitelisted(chosen_species))
|
||||
if(is_alien_whitelisted(src.client, chosen_species))
|
||||
return chosen_species.name
|
||||
|
||||
return SPECIES_HUMAN
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
to_chat(src,span_warning("You have not set your scale yet. Do this on the VORE tab in character setup."))
|
||||
|
||||
//Can they play?
|
||||
if(!is_alien_whitelisted(src,GLOB.all_species[client?.prefs?.species]) && !check_rights(R_ADMIN, 0))
|
||||
if(!is_alien_whitelisted(src.client,GLOB.all_species[client?.prefs?.species]) && !check_rights(R_ADMIN, 0))
|
||||
pass = FALSE
|
||||
to_chat(src,span_warning("You are not allowed to spawn in as this species."))
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
|
||||
var/adminrank = "Player"
|
||||
if(usr && usr.client && usr.client.holder)
|
||||
adminrank = usr.client.holder.rank
|
||||
adminrank = usr.client.holder.rank_names()
|
||||
|
||||
|
||||
var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')")
|
||||
@@ -449,7 +449,7 @@
|
||||
|
||||
var/adminrank = "Player"
|
||||
if(usr && usr.client && usr.client.holder)
|
||||
adminrank = usr.client.holder.rank
|
||||
adminrank = usr.client.holder.rank_names()
|
||||
|
||||
|
||||
replytext = replacetext(replytext, "%BR%", "")
|
||||
@@ -522,7 +522,7 @@
|
||||
|
||||
var/adminrank = "Player"
|
||||
if(usr && usr.client && usr.client.holder)
|
||||
adminrank = usr.client.holder.rank
|
||||
adminrank = usr.client.holder.rank_names()
|
||||
|
||||
|
||||
var/datum/db_query/insert_query = SSdbcore.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
|
||||
|
||||
Reference in New Issue
Block a user