diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm
index 26a1535e33..c5c79b9610 100644
--- a/code/__DEFINES/admin.dm
+++ b/code/__DEFINES/admin.dm
@@ -1,74 +1,148 @@
-//A set of constants used to determine which type of mute an admin wishes to apply:
-//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
-//Therefore there needs to be a gap between the flags_1 for the automute flags_1
-#define MUTE_IC 1
-#define MUTE_OOC 2
-#define MUTE_PRAY 4
-#define MUTE_ADMINHELP 8
-#define MUTE_DEADCHAT 16
-#define MUTE_ALL 31
-
-//Some constants for DB_Ban
-#define BANTYPE_PERMA 1
-#define BANTYPE_TEMP 2
-#define BANTYPE_JOB_PERMA 3
-#define BANTYPE_JOB_TEMP 4
-#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
-
-#define BANTYPE_ADMIN_PERMA 7
-#define BANTYPE_ADMIN_TEMP 8
-#define BANTYPE_ANY_JOB 9 //used to remove jobbans
-
-//Please don't edit these values without speaking to Errorage first ~Carn
-//Admin Permissions
-#define R_BUILDMODE 1
-#define R_ADMIN 2
-#define R_BAN 4
-#define R_FUN 8
-#define R_SERVER 16
-#define R_DEBUG 32
-#define R_POSSESS 64
-#define R_PERMISSIONS 128
-#define R_STEALTH 256
-#define R_POLL 512
-#define R_VAREDIT 1024
-#define R_SOUNDS 2048
-#define R_SPAWN 4096
-
-#if DM_VERSION > 512
-#error Remove the flag below , its been long enough
-#endif
-//legacy , remove post 512, it was replaced by R_POLL
-#define R_REJUVINATE 2
-
-#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
-
-#define ADMIN_QUE(user) "(?)"
-#define ADMIN_FLW(user) "(FLW)"
-#define ADMIN_PP(user) "(PP)"
-#define ADMIN_VV(atom) "(VV)"
-#define ADMIN_SM(user) "(SM)"
-#define ADMIN_TP(user) "(TP)"
-#define ADMIN_KICK(user) "(KICK)"
-#define ADMIN_CENTCOM_REPLY(user) "(RPLY)"
-#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)"
-#define ADMIN_SC(user) "(SC)"
-#define ADMIN_SMITE(user) "(SMITE)"
-#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
-#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
-#define ADMIN_SET_SD_CODE "(SETCODE)"
-#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]"
-#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]"
-#define ADMIN_JMP(src) "(JMP)"
-#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
-#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
-#define ADMIN_INDIVIDUALLOG(user) "(LOGS)"
-
-#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt"
-#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage"
-#define ADMIN_PUNISHMENT_GIB "Gib"
-#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device"
-
-#define AHELP_ACTIVE 1
-#define AHELP_CLOSED 2
-#define AHELP_RESOLVED 3
+//A set of constants used to determine which type of mute an admin wishes to apply:
+//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
+//Therefore there needs to be a gap between the flags_1 for the automute flags_1
+#define MUTE_IC 1
+#define MUTE_OOC 2
+#define MUTE_PRAY 4
+#define MUTE_ADMINHELP 8
+#define MUTE_DEADCHAT 16
+#define MUTE_ALL 31
+
+//Some constants for DB_Ban
+#define BANTYPE_PERMA 1
+#define BANTYPE_TEMP 2
+#define BANTYPE_JOB_PERMA 3
+#define BANTYPE_JOB_TEMP 4
+#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
+
+#define BANTYPE_ADMIN_PERMA 7
+#define BANTYPE_ADMIN_TEMP 8
+#define BANTYPE_ANY_JOB 9 //used to remove jobbans
+
+//Please don't edit these values without speaking to Errorage first ~Carn
+//Admin Permissions
+#define R_BUILDMODE 1
+#define R_ADMIN 2
+#define R_BAN 4
+#define R_FUN 8
+#define R_SERVER 16
+#define R_DEBUG 32
+#define R_POSSESS 64
+#define R_PERMISSIONS 128
+#define R_STEALTH 256
+#define R_POLL 512
+#define R_VAREDIT 1024
+#define R_SOUNDS 2048
+#define R_SPAWN 4096
+
+#if DM_VERSION > 512
+#error Remove the flag below , its been long enough
+#endif
+//legacy , remove post 512, it was replaced by R_POLL
+#define R_REJUVINATE 2
+
+#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
+
+#define ADMIN_QUE(user) "(?)"
+#define ADMIN_FLW(user) "(FLW)"
+#define ADMIN_PP(user) "(PP)"
+#define ADMIN_VV(atom) "(VV)"
+#define ADMIN_SM(user) "(SM)"
+#define ADMIN_TP(user) "(TP)"
+#define ADMIN_KICK(user) "(KICK)"
+#define ADMIN_CENTCOM_REPLY(user) "(RPLY)"
+#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)"
+#define ADMIN_SC(user) "(SC)"
+#define ADMIN_SMITE(user) "(SMITE)"
+#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
+#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
+#define ADMIN_SET_SD_CODE "(SETCODE)"
+#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]"
+#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]"
+#define ADMIN_JMP(src) "(JMP)"
+#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
+#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
+#define ADMIN_INDIVIDUALLOG(user) "(LOGS)"
+
+#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt"
+#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage"
+#define ADMIN_PUNISHMENT_GIB "Gib"
+#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device"
+
+#define AHELP_ACTIVE 1
+#define AHELP_CLOSED 2
+#define AHELP_RESOLVED 3
+//A set of constants used to determine which type of mute an admin wishes to apply:
+//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
+//Therefore there needs to be a gap between the flags for the automute flags
+#define MUTE_IC 1
+#define MUTE_OOC 2
+#define MUTE_PRAY 4
+#define MUTE_ADMINHELP 8
+#define MUTE_DEADCHAT 16
+#define MUTE_ALL 31
+
+//Some constants for DB_Ban
+#define BANTYPE_PERMA 1
+#define BANTYPE_TEMP 2
+#define BANTYPE_JOB_PERMA 3
+#define BANTYPE_JOB_TEMP 4
+#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
+
+#define BANTYPE_ADMIN_PERMA 7
+#define BANTYPE_ADMIN_TEMP 8
+#define BANTYPE_ANY_JOB 9 //used to remove jobbans
+
+//Please don't edit these values without speaking to Errorage first ~Carn
+//Admin Permissions
+#define R_BUILDMODE 1
+#define R_ADMIN 2
+#define R_BAN 4
+#define R_FUN 8
+#define R_SERVER 16
+#define R_DEBUG 32
+#define R_POSSESS 64
+#define R_PERMISSIONS 128
+#define R_STEALTH 256
+#define R_POLL 512
+#define R_VAREDIT 1024
+#define R_SOUNDS 2048
+#define R_SPAWN 4096
+
+#if DM_VERSION > 512
+#error Remove the flag below , its been long enough
+#endif
+//legacy , remove post 512, it was replaced by R_POLL
+#define R_REJUVINATE 2
+
+#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.
+
+#define ADMIN_QUE(user) "(?)"
+#define ADMIN_FLW(user) "(FLW)"
+#define ADMIN_PP(user) "(PP)"
+#define ADMIN_VV(atom) "(VV)"
+#define ADMIN_SM(user) "(SM)"
+#define ADMIN_TP(user) "(TP)"
+#define ADMIN_KICK(user) "(KICK)"
+#define ADMIN_CENTCOM_REPLY(user) "(RPLY)"
+#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)"
+#define ADMIN_SC(user) "(SC)"
+#define ADMIN_SMITE(user) "(SMITE)"
+#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
+#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
+#define ADMIN_SET_SD_CODE "(SETCODE)"
+#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]"
+#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]"
+#define ADMIN_JMP(src) "(JMP)"
+#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
+#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
+#define ADMIN_INDIVIDUALLOG(user) "(LOGS)"
+
+#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt"
+#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage"
+#define ADMIN_PUNISHMENT_GIB "Gib"
+#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device"
+
+#define AHELP_ACTIVE 1
+#define AHELP_CLOSED 2
+#define AHELP_RESOLVED 3
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 5da6c80b3a..180d14853e 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -282,6 +282,8 @@ GLOBAL_PROTECT(config_dir)
var/list/policies = list()
+ var/debug_admin_hrefs = FALSE //turns off admin href token protection for debugging purposes
+
/datum/configuration/New()
gamemode_cache = typecacheof(/datum/game_mode,TRUE)
for(var/T in gamemode_cache)
@@ -569,6 +571,8 @@ GLOBAL_PROTECT(config_dir)
error_msg_delay = text2num(value)
if("irc_announce_new_game")
irc_announce_new_game = TRUE
+ if("debug_admin_hrefs")
+ debug_admin_hrefs = TRUE
else
#if DM_VERSION > 511
#error Replace the line below with WRITE_FILE(GLOB.config_error_log, "Unknown setting in configuration: '[name]'")
diff --git a/code/controllers/subsystem/events.dm b/code/controllers/subsystem/events.dm
index c41f422575..7816a6bdf8 100644
--- a/code/controllers/subsystem/events.dm
+++ b/code/controllers/subsystem/events.dm
@@ -116,6 +116,8 @@ SUBSYSTEM_DEF(events)
//allows a client to trigger an event
//aka Badmin Central
+// > Not in modules/admin
+// REEEEEEEEE
/client/proc/forceEvent()
set name = "Trigger Event"
set category = "Fun"
@@ -131,7 +133,7 @@ SUBSYSTEM_DEF(events)
var/magic = ""
var/holiday = ""
for(var/datum/round_event_control/E in SSevents.control)
- dat = "
[E]"
+ dat = "
[E]"
if(E.holidayID)
holiday += dat
else if(E.wizardevent)
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index 84cb42cf47..d55a32609a 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -25,10 +25,10 @@
/datum/proc/vv_get_dropdown()
. = list()
. += "---"
- .["Call Proc"] = "?_src_=vars;proc_call=\ref[src]"
- .["Mark Object"] = "?_src_=vars;mark_object=\ref[src]"
- .["Delete"] = "?_src_=vars;delete=\ref[src]"
- .["Show VV To Player"] = "?_src_=vars;expose=\ref[src]"
+ .["Call Proc"] = "?_src_=vars;[HrefToken()];proc_call=\ref[src]"
+ .["Mark Object"] = "?_src_=vars;[HrefToken()];mark_object=\ref[src]"
+ .["Delete"] = "?_src_=vars;[HrefToken()];delete=\ref[src]"
+ .["Show VV To Player"] = "?_src_=vars;[HrefToken(TRUE)];expose=\ref[src]"
/datum/proc/on_reagent_change()
@@ -81,26 +81,26 @@
if(istype(D, /atom))
var/atom/A = D
if(isliving(A))
- atomsnowflake += "[D]"
+ atomsnowflake += "[D]"
if(A.dir)
- atomsnowflake += "
<< [dir2text(A.dir)] >>"
+ atomsnowflake += "
<< [dir2text(A.dir)] >>"
var/mob/living/M = A
atomsnowflake += {"
-
[M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"]
+
[M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"]
- BRUTE:[M.getBruteLoss()]
- FIRE:[M.getFireLoss()]
- TOXIN:[M.getToxLoss()]
- OXY:[M.getOxyLoss()]
- CLONE:[M.getCloneLoss()]
- BRAIN:[M.getBrainLoss()]
- STAMINA:[M.getStaminaLoss()]
+ BRUTE:[M.getBruteLoss()]
+ FIRE:[M.getFireLoss()]
+ TOXIN:[M.getToxLoss()]
+ OXY:[M.getOxyLoss()]
+ CLONE:[M.getCloneLoss()]
+ BRAIN:[M.getBrainLoss()]
+ STAMINA:[M.getStaminaLoss()]
"}
else
- atomsnowflake += "[D]"
+ atomsnowflake += "[D]"
if(A.dir)
- atomsnowflake += "
<< [dir2text(A.dir)] >>"
+ atomsnowflake += "
<< [dir2text(A.dir)] >>"
else
atomsnowflake += "[D]"
@@ -124,12 +124,12 @@
if (islist)
dropdownoptions = list(
"---",
- "Add Item" = "?_src_=vars;listadd=[refid]",
- "Remove Nulls" = "?_src_=vars;listnulls=[refid]",
- "Remove Dupes" = "?_src_=vars;listdupes=[refid]",
- "Set len" = "?_src_=vars;listlen=[refid]",
- "Shuffle" = "?_src_=vars;listshuffle=[refid]",
- "Show VV To Player" = "?_src_=vars;expose=[refid]"
+ "Add Item" = "?_src_=vars;[HrefToken()];listadd=[refid]",
+ "Remove Nulls" = "?_src_=vars;[HrefToken()];listnulls=[refid]",
+ "Remove Dupes" = "?_src_=vars;[HrefToken()];listdupes=[refid]",
+ "Set len" = "?_src_=vars;[HrefToken()];listlen=[refid]",
+ "Shuffle" = "?_src_=vars;[HrefToken()];listshuffle=[refid]",
+ "Show VV To Player" = "?_src_=vars;[HrefToken()];expose=[refid]"
)
else
dropdownoptions = D.vv_get_dropdown()
@@ -335,7 +335,7 @@