diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index ed70858673..6280fb3210 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -13,7 +13,7 @@ var/showadminmessages = 1 /proc/toggle_adminmsg() set name = "Toggle Admin Messages" set category = "Server" - showadminmessages = !showadminmessages + //showadminmessages = !showadminmessages /obj/admins/Topic(href, href_list) ..() @@ -1352,33 +1352,75 @@ var/showadminmessages = 1 /obj/admins/proc/player() var/dat = "Player Menu" - dat += "" + dat += "
NameReal NameKeyOptionsPMTraitor?
" //add to this if wanting to add back in IP checking //add if you want to know their ip to the lists below var/list/mobs = sortmobs() + var/DBConnection/dbcon = new() + dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") + if(!dbcon.IsConnected()) + usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.
" - for(var/mob/M in mobs) - if(M.ckey) - dat += "" - if(istype(M, /mob/living/silicon/ai)) - dat += "" - if(istype(M, /mob/living/silicon/robot)) - dat += "" - if(istype(M, /mob/living/carbon/human)) - dat += "" - if(istype(M, /mob/new_player)) - dat += "" - if(istype(M, /mob/dead/observer)) - dat += "" - if(istype(M, /mob/living/carbon/monkey)) - dat += "" - if(istype(M, /mob/living/carbon/alien)) - dat += "" - dat += {" - - - - "} + for(var/mob/M in mobs) + if(M.ckey) + dat += "" + if(istype(M, /mob/living/silicon/ai)) + dat += "" + if(istype(M, /mob/living/silicon/robot)) + dat += "" + if(istype(M, /mob/living/carbon/human)) + dat += "" + if(istype(M, /mob/new_player)) + dat += "" + if(istype(M, /mob/dead/observer)) + dat += "" + if(istype(M, /mob/living/carbon/monkey)) + dat += "" + if(istype(M, /mob/living/carbon/alien)) + dat += "" + dat += {" + + + + "} + dat += "" + + else + + for(var/mob/M in mobs) + if(M.ckey) + + var/DBQuery/query = dbcon.NewQuery("SELECT karma FROM karmatotals WHERE byondkey='[M.ckey]'") + query.Execute() + + var/currentkarma + while(query.NextRow()) + currentkarma = query.item[1] + + dat += "" + if(istype(M, /mob/living/silicon/ai)) + dat += "" + if(istype(M, /mob/living/silicon/robot)) + dat += "" + if(istype(M, /mob/living/carbon/human)) + dat += "" + if(istype(M, /mob/new_player)) + dat += "" + if(istype(M, /mob/dead/observer)) + dat += "" + if(istype(M, /mob/living/carbon/monkey)) + dat += "" + if(istype(M, /mob/living/carbon/alien)) + dat += "" + dat += {" + + + + "} + if(currentkarma) + dat += "" + else + dat += "" dat += "
NameReal NameKeyOptionsPMTraitor?Karma
IP:(IP: [M.lastKnownIP])
[M.name]AICyborg[M.real_name]New PlayerGhostMonkeyAlien[(M.client ? "[(M.client.goon ? "" : "")][M.client]" : "No client")]XPM[checktraitor(M) ? "" : ""]Traitor?
[M.name]AICyborg[M.real_name]New PlayerGhostMonkeyAlien[(M.client ? "[(M.client.goon ? "" : "")][M.client]" : "No client")]XPM[checktraitor(M) ? "" : ""]Traitor?NOT CONNECTED
[M.name]AICyborg[M.real_name]New PlayerGhostMonkeyAlien[(M.client ? "[(M.client.goon ? "" : "")][M.client]" : "No client")]XPM[checktraitor(M) ? "" : ""]Traitor?[currentkarma]
0
"