From a0081713f33fc2d20018860abb00c42fd42973ae Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 2 Nov 2019 18:51:59 -0700 Subject: [PATCH] Adds web playerinfo link --- code/controllers/configuration.dm | 8 ++++++-- code/modules/admin/admin.dm | 2 ++ code/modules/admin/topic.dm | 7 +++++++ config/example/config.txt | 3 +++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 8ae35d52179..d24e4dc94f5 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -79,7 +79,7 @@ var/auto_cryo_ssd_mins = 0 var/ssd_warning = 0 - + var/list_afk_minimum = 5 // How long people have to be AFK before it's listed on the "List AFK players" verb var/traitor_objectives_amount = 2 @@ -144,6 +144,7 @@ var/ipintel_detailsurl = "https://iphub.info/?ip=" var/forum_link_url + var/forum_playerinfo_url var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt @@ -244,7 +245,7 @@ //cube monkey limit var/cubemonkeycap = 20 - + // Makes gamemodes respect player limits var/enable_gamemode_player_limit = 0 @@ -354,6 +355,9 @@ if("forum_link_url") config.forum_link_url = value + if("forum_playerinfo_url") + config.forum_playerinfo_url = value + if("log_ooc") config.log_ooc = 1 diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 6967a374b51..1801324e72d 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -100,6 +100,8 @@ var/global/nologevent = 0 body += "Jobban | " body += "Appearance Ban | " body += "Notes | " + if(config.forum_playerinfo_url) + body += "WebInfo | " if(M.client) if(M.client.check_watchlist(M.client.ckey)) body += "Remove from Watchlist | " diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index a318c316532..8db44a1ce53 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -936,6 +936,13 @@ target = text2num(target) show_note(index = target) + else if(href_list["webtools"]) + var/target_ckey = href_list["webtools"] + if(config.forum_playerinfo_url) + var/url_to_open = config.forum_playerinfo_url + target_ckey + if(alert("Open [url_to_open]",,"Yes","No")=="Yes") + usr.client << link(url_to_open) + else if(href_list["shownoteckey"]) var/target_ckey = href_list["shownoteckey"] show_note(target_ckey) diff --git a/config/example/config.txt b/config/example/config.txt index 7dfdc1e413a..27da54922bb 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -213,6 +213,9 @@ GUEST_BAN ## URL to use to link forum accounts. If not set, no link option will be offered. #FORUM_LINK_URL https://example.com/link.php?token= +## URL to use for admins accessing the web-based tools menu +#FORUM_PLAYERINFO_URL https://example.com/info.php?ckey= + ## Comment to disable checking for the cid randomizer dll. (disabled if database isn't enabled or connected) CHECK_RANDOMIZER