diff --git a/code/_helpers/unsorted_vr.dm b/code/_helpers/unsorted_vr.dm index 9336591552..daf4db48d7 100644 --- a/code/_helpers/unsorted_vr.dm +++ b/code/_helpers/unsorted_vr.dm @@ -52,3 +52,16 @@ if(sender) query_string += "&from=[url_encode(sender)]" world.Export("[config.chat_webhook_url]?[query_string]") + +/proc/admin_action_message(var/admin = "INVALID", var/user = "INVALID", var/action = "INVALID", var/reason = "INVALID", var/time = "INVALID") + if (!config.chat_webhook_url || !action) + return + spawn(0) + var/query_string = "type=adminaction" + query_string += "&key=[url_encode(config.chat_webhook_key)]" + query_string += "&admin=[url_encode(admin)]" + query_string += "&user=[url_encode(user)]" + query_string += "&action=[url_encode(action)]" + query_string += "&reason=[url_encode(reason)]" + query_string += "&time=[url_encode(time)]" + world.Export("[config.chat_webhook_url]?[query_string]") diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index 0b3899ad99..18efe723f0 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -119,6 +119,7 @@ var/savefile/Banlist Banlist["temp"] << temp if (temp) Banlist["minutes"] << bantimestamp + admin_action_message(bannedby, ckey, "banned", reason, temp ? minutes : -1) //VOREStation Add return 1 /proc/RemoveBan(foldername) @@ -147,7 +148,7 @@ var/savefile/Banlist Banlist.cd = "/base" Banlist.dir.Remove(A) continue - + admin_action_message(usr.key, key, "unbanned", "\[Unban\]", 0) //VOREStation Add return 1 /proc/GetExp(minutes as num) diff --git a/code/modules/admin/newbanjob.dm b/code/modules/admin/newbanjob.dm index 0c3e560f78..9b1d2eeaa3 100644 --- a/code/modules/admin/newbanjob.dm +++ b/code/modules/admin/newbanjob.dm @@ -154,7 +154,7 @@ var/savefile/Banlistjob Banlistjob["temp"] << temp if (temp) Banlistjob["minutes"] << bantimestamp - + admin_action_message(bannedby, ckey, "jobbanned-"+rank, reason, temp ? minutes : -1) //VOREStation Add return 1 /proc/RemoveBanjob(foldername) @@ -185,7 +185,7 @@ var/savefile/Banlistjob Banlistjob.cd = "/base" Banlistjob.dir.Remove(A) continue - + admin_action_message(usr.key, key, "unjobbanned-"+rank, "\[Unban\]", 0) //VOREStation Add return 1 /proc/GetBanExpjob(minutes as num) diff --git a/code/modules/admin/player_notes.dm b/code/modules/admin/player_notes.dm index dee9a69366..19c23c537e 100644 --- a/code/modules/admin/player_notes.dm +++ b/code/modules/admin/player_notes.dm @@ -105,7 +105,7 @@ datum/admins/proc/notes_gethtml(var/ckey) message_admins("[key_name_admin(user)] has edited [key]'s notes.") log_admin("[key_name(user)] has edited [key]'s notes.") - + admin_action_message(user.key, key, "added note on", note, 0) //VOREStation Add del(info) // savefile, so NOT qdel //Updating list of keys with notes on them @@ -130,7 +130,7 @@ datum/admins/proc/notes_gethtml(var/ckey) message_admins("[key_name_admin(usr)] deleted one of [key]'s notes.") log_admin("[key_name(usr)] deleted one of [key]'s notes.") - + admin_action_message(usr.key, key, "deleted note on", "\[Note gone\]", 0) //VOREStation Add qdel(info) /proc/show_player_info_irc(var/key as text) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 63959aed86..07168a4e32 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -827,6 +827,7 @@ log_admin("[key_name(usr)] booted [key_name(M)] for reason: '[reason]'.") message_admins("[key_name_admin(usr)] booted [key_name_admin(M)] for reason '[reason]'.", 1) //M.client = null + admin_action_message(usr.key, M.key, "kicked", reason, 0) //VOREStation Add qdel(M.client) else if(href_list["removejobban"])